org.apache.tuscany.spi.implementation.java
Class AbstractPropertyProcessor<A extends Annotation>
java.lang.Object
org.apache.tuscany.spi.implementation.java.ImplementationProcessorExtension
org.apache.tuscany.spi.implementation.java.AbstractPropertyProcessor<A>
- All Implemented Interfaces:
- ImplementationProcessor
public abstract class AbstractPropertyProcessor<A extends Annotation>
- extends ImplementationProcessorExtension
Base class for ImplementationProcessors that handle annotations that add Properties.
- Version:
- $Rev: 453741 $ $Date: 2006-10-06 12:36:54 -0700 (Fri, 06 Oct 2006) $
Method Summary |
protected
|
createProperty(String name,
Class<T> javaType,
Member member)
|
protected abstract String |
getName(A annotation)
|
protected
|
initProperty(JavaMappedProperty<T> property,
A annotation,
CompositeComponent parent,
DeploymentContext context)
|
static String |
toPropertyName(String name)
|
|
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. |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPropertyProcessor
protected AbstractPropertyProcessor(Class<A> annotationClass,
ImplementationProcessorService service)
visitMethod
public void visitMethod(CompositeComponent parent,
Method method,
PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
DeploymentContext context)
throws ProcessingException
- Description copied from interface:
ImplementationProcessor
- A callback received as the component implementation's public and protected methods are evaluated
- Specified by:
visitMethod
in interface ImplementationProcessor
- Overrides:
visitMethod
in class ImplementationProcessorExtension
- Parameters:
parent
- the parent compositemethod
- the current public or protected method being evaluatedtype
- the incomplete component type associated with the implementation classcontext
- the current deployment context
- Throws:
ProcessingException
- if an error is encountered while processing metadata
visitField
public void visitField(CompositeComponent parent,
Field field,
PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
DeploymentContext context)
throws ProcessingException
- Description copied from interface:
ImplementationProcessor
- A callback received as the component implementation's public and protected fields are evaluated
- Specified by:
visitField
in interface ImplementationProcessor
- Overrides:
visitField
in class ImplementationProcessorExtension
- Parameters:
parent
- the parent compositefield
- the current public or protected field being evaluatedtype
- the incomplete component type associated with the implementation classcontext
- the current deployment context
- Throws:
ProcessingException
- if an error is encountered while processing metadata
visitConstructor
public <T> void visitConstructor(CompositeComponent parent,
Constructor<T> constructor,
PojoComponentType<JavaMappedService,JavaMappedReference,JavaMappedProperty<?>> type,
DeploymentContext context)
throws ProcessingException
- Description copied from interface:
ImplementationProcessor
- 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 ImplementationProcessor
- Overrides:
visitConstructor
in class ImplementationProcessorExtension
- Parameters:
parent
- the parent compositeconstructor
- the constructor used for instantiating component implementation instancestype
- the incomplete component type associated with the implementation classcontext
- the current deployment context
- Throws:
ProcessingException
- if an error is encountered while processing metadata
getName
protected abstract String getName(A annotation)
initProperty
protected <T> void initProperty(JavaMappedProperty<T> property,
A annotation,
CompositeComponent parent,
DeploymentContext context)
throws ProcessingException
- Throws:
ProcessingException
createProperty
protected <T> JavaMappedProperty<T> createProperty(String name,
Class<T> javaType,
Member member)
throws ProcessingException
- Throws:
ProcessingException
toPropertyName
public static String toPropertyName(String name)
-