2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.implementation.java.introspect.impl
Class HeuristicPojoProcessor
java.lang.Object
org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor
org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor
- All Implemented Interfaces:
- JavaClassVisitor
public class HeuristicPojoProcessor
- extends BaseJavaClassVisitor
Heuristically evaluates an un-annotated Java implementation type to determine
services, references, and properties according to the algorithm described in
the SCA Java Client and Implementation Model Specification
TODO
Implement: When no service interface is annotated, need to calculate a
single service comprising all public methods that are not reference or
property injection sites. If that service can be exactly mapped to an
interface implemented by the class then the service interface will be defined
in terms of that interface.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeuristicPojoProcessor
public HeuristicPojoProcessor(AssemblyFactory assemblyFactory,
JavaInterfaceFactory javaFactory)
visitEnd
public <T> void visitEnd(java.lang.Class<T> clazz,
JavaImplementation type)
throws IntrospectionException
- Description copied from interface:
JavaClassVisitor
- The final callback received when all other callbacks during evaluation of
the component implementation have been issued
- Specified by:
visitEnd
in interface JavaClassVisitor
- Overrides:
visitEnd
in class BaseJavaClassVisitor
- Parameters:
clazz
- the component implementation classtype
- the incomplete component type associated with the
implementation class
- Throws:
IntrospectionException
- if an error is encountered while processing
metadata
areUnique
public boolean areUnique(JavaParameterImpl[] parameters)
createReference
public Reference createReference(java.lang.String name,
java.lang.Class<?> paramType)
throws IntrospectionException
- Throws:
IntrospectionException
createService
public Service createService(java.lang.Class<?> interfaze)
throws InvalidInterfaceException
- Throws:
InvalidInterfaceException
processCallback
public void processCallback(java.lang.Class<?> interfaze,
Contract contract)
throws InvalidServiceType
- Throws:
InvalidServiceType
injectionAnnotationsPresent
public boolean injectionAnnotationsPresent(java.lang.annotation.Annotation[][] annots)