com.softwareag.centrasite.appl.framework
Class BeanTypeAnnotationProcessor

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.BeanTypeAnnotationProcessor

public final class BeanTypeAnnotationProcessor
extends java.lang.Object

Singleton class for processing CSAF annotations on a given persistent class and adding the obtained meta-information to a RegistryObjectModel instance.


Method Summary
 void addAnnnotationProcessor(java.lang.Class<?> annotationType, PropertyAnnotationProcessor annotationProcessor)
          Adds a PropertyAnnotationProcessor instance to the default processors.
static BeanTypeAnnotationProcessor getInstance()
          Returns the default BeanTypeAnnotationProcessor.
 Property getProperty(java.lang.Class<? extends RegistryBean> persistentClass, java.lang.reflect.Method getter, java.util.List<java.lang.annotation.Annotation> annotations, BeanType beanType)
           
 void processClass(java.lang.Class<? extends RegistryBean> persistentClass, RegistryObjectModel model)
          Processes all CSAF annotations on type and method level for the given persistent class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BeanTypeAnnotationProcessor getInstance()
Returns the default BeanTypeAnnotationProcessor.


addAnnnotationProcessor

public void addAnnnotationProcessor(java.lang.Class<?> annotationType,
                                    PropertyAnnotationProcessor annotationProcessor)
Adds a PropertyAnnotationProcessor instance to the default processors.

Parameters:
annotationType - Type of annotation. May be custom defined type.
annotationProcessor -

processClass

public void processClass(java.lang.Class<? extends RegistryBean> persistentClass,
                         RegistryObjectModel model)
                  throws CSAppFrameworkException
Processes all CSAF annotations on type and method level for the given persistent class. Updates the given registry object model instance with the obtained mapping information.

Parameters:
persistentClass - Annotated java bean class containing mapping information.
model - Registry object model that the given persistent class belongs to.
Throws:
CSAppFrameworkException

getProperty

public Property getProperty(java.lang.Class<? extends RegistryBean> persistentClass,
                            java.lang.reflect.Method getter,
                            java.util.List<java.lang.annotation.Annotation> annotations,
                            BeanType beanType)