org.apache.tuscany.sca.implementation.java.introspect.impl
Class ConstructorProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor
      extended by org.apache.tuscany.sca.implementation.java.introspect.impl.ConstructorProcessor
All Implemented Interfaces:
JavaClassVisitor

public class ConstructorProcessor
extends BaseJavaClassVisitor

Handles processing of a constructor decorated with Constructor


Field Summary
 
Fields inherited from class org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor
assemblyFactory
 
Constructor Summary
ConstructorProcessor(AssemblyFactory factory)
           
 
Method Summary
<T> void
visitClass(java.lang.Class<T> clazz, JavaImplementation type)
          A callback received when the component implementation class is first loaded
<T> void
visitConstructor(java.lang.reflect.Constructor<T> constructor, JavaImplementation type)
          A callback received as the component implementation's constructor used for instantiation by the runtime is evaluated.
 
Methods inherited from class org.apache.tuscany.sca.implementation.java.introspect.impl.BaseJavaClassVisitor
visitConstructorParameter, visitEnd, visitField, visitMethod, visitSuperClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstructorProcessor

public ConstructorProcessor(AssemblyFactory factory)
Method Detail

visitClass

public <T> void visitClass(java.lang.Class<T> clazz,
                           JavaImplementation type)
                throws IntrospectionException
Description copied from interface: JavaClassVisitor
A callback received when the component implementation class is first loaded

Specified by:
visitClass in interface JavaClassVisitor
Overrides:
visitClass in class BaseJavaClassVisitor
Parameters:
clazz - the component implementation class
type - the incomplete component type associated with the implementation class
Throws:
IntrospectionException - if an error is encountered while processing metadata

visitConstructor

public <T> void visitConstructor(java.lang.reflect.Constructor<T> constructor,
                                 JavaImplementation type)
                      throws IntrospectionException
Description copied from interface: JavaClassVisitor
A callback received as the component implementation's constructor used for instantiation by the runtime is evaluated. If an implementation contains more than one constructor, the constructor passed to the callback will be chosen according to the algorithm described in the SCA Java Client and Implementation Model Specification.

Specified by:
visitConstructor in interface JavaClassVisitor
Overrides:
visitConstructor in class BaseJavaClassVisitor
Parameters:
constructor - the constructor used for instantiating component implementation instances
type - the incomplete component type associated with the implementation class
Throws:
IntrospectionException - if an error is encountered while processing metadata