Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.implementation.java
Interface ImplementationProcessor

All Known Implementing Classes:
AbstractPropertyProcessor, ImplementationProcessorExtension

public interface ImplementationProcessor

Implementations process class-level metadata, typically parsing annotations and updating the corresponding ComponentType. A processor may, for example, create a JavaMappedProperty which is responsible for injecting a complex type on a component implementation instance when it is instantiated.

Processors will receive callbacks as the implementation class is walked while evalauting an assembly. It is the responsibility of the parser to determine whether to perform an action during the callback.

Version:
$Rev: 441912 $ $Date: 2006-09-09 22:48:45 -0700 (Sat, 09 Sep 2006) $

Method Summary
<T> void
visitClass(CompositeComponent parent, Class<T> clazz, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          A callback received when the component implementation class is first loaded
<T> void
visitConstructor(CompositeComponent parent, Constructor<T> constructor, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          A callback received as the component implementation's constructor used for instantiation by the runtime is evaluated.
<T> void
visitEnd(CompositeComponent parent, Class<T> clazz, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          The final callback received when all other callbacks during evaluation of the component implementation have been issued
 void visitField(CompositeComponent parent, Field field, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          A callback received as the component implementation's public and protected fields are evaluated
 void visitMethod(CompositeComponent parent, Method method, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          A callback received as the component implementation's public and protected methods are evaluated
<T> void
visitSuperClass(CompositeComponent parent, Class<T> clazz, PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type, DeploymentContext context)
          A callback received as the component implementation class hierarchy is evaluated
 

Method Detail

visitClass

<T> void visitClass(CompositeComponent parent,
                    Class<T> clazz,
                    PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                    DeploymentContext context)
                throws ProcessingException
A callback received when the component implementation class is first loaded

Parameters:
parent - the parent composite
clazz - the component implementation class
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

visitSuperClass

<T> void visitSuperClass(CompositeComponent parent,
                         Class<T> clazz,
                         PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                         DeploymentContext context)
                     throws ProcessingException
A callback received as the component implementation class hierarchy is evaluated

Parameters:
parent - the parent composite
clazz - the superclass in the component implmentation's class hierarchy
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

visitMethod

void visitMethod(CompositeComponent parent,
                 Method method,
                 PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                 DeploymentContext context)
                 throws ProcessingException
A callback received as the component implementation's public and protected methods are evaluated

Parameters:
parent - the parent composite
method - the current public or protected method being evaluated
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

visitConstructor

<T> void visitConstructor(CompositeComponent parent,
                          Constructor<T> constructor,
                          PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                          DeploymentContext context)
                      throws ProcessingException
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.

Parameters:
parent - the parent composite
constructor - the constructor used for instantiating component implementation instances
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

visitField

void visitField(CompositeComponent parent,
                Field field,
                PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                DeploymentContext context)
                throws ProcessingException
A callback received as the component implementation's public and protected fields are evaluated

Parameters:
parent - the parent composite
field - the current public or protected field being evaluated
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

visitEnd

<T> void visitEnd(CompositeComponent parent,
                  Class<T> clazz,
                  PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
                  DeploymentContext context)
              throws ProcessingException
The final callback received when all other callbacks during evaluation of the component implementation have been issued

Parameters:
parent - the parent composite
clazz - the component implementation class
type - the incomplete component type associated with the implementation class
context - the current deployment context
Throws:
ProcessingException - if an error is encountered while processing metadata

Apache Tuscany SCA Kernel Sub-Project

-