org.jboss.kernel.plugins.annotations
Class PropertyAnnotationPlugin<C extends Annotation>

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C>
          extended by org.jboss.kernel.plugins.annotations.PropertyAnnotationPlugin<C>
Type Parameters:
C - annotation type
All Implemented Interfaces:
Cloneable, Annotation2ValueMetaDataAdapter<C>, AnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C>, PropertyAware, org.jboss.util.JBossInterface
Direct Known Subclasses:
CollectionsAnnotationPlugin, InjectAnnotationPlugin, JavaBeanValueAnnotationPlugin, NullValueAnnotationPlugin, StringValueAnnotationPlugin, ThisValueAnnotationPlugin, ValueFactoryAnnotationPlugin

public abstract class PropertyAnnotationPlugin<C extends Annotation>
extends AbstractAnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C>
implements PropertyAware, Annotation2ValueMetaDataAdapter<C>

Abstract property annotation plugin.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
protected PropertyAnnotationPlugin(Class<C> annotation)
           
 
Method Summary
protected  Set<PropertyMetaData> getProperties(KernelControllerContext context)
          Get the PropertyMetaData set.
protected  PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info, C annotation)
          Get PropertyMetaData instance.
protected  PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info, C annotation, BeanMetaData beanMetaData)
          Get PropertyMetaData instance.
protected  PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info, C annotation, KernelControllerContext context)
          Get PropertyMetaData instance.
protected  List<? extends MetaDataVisitorNode> internalApplyAnnotation(org.jboss.beans.info.spi.PropertyInfo info, C annotation, KernelControllerContext context)
          Apply annotation since it's not present.
protected  boolean isElementTypeSupported(ElementType type)
          Is type supported by plugin.
protected  boolean isMetaDataAlreadyPresent(org.jboss.beans.info.spi.PropertyInfo info, C annotation, BeanMetaData beanMetaData)
          Is meta data already present.
 
Methods inherited from class org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin
applyAnnotation, cleanAnnotation, getAnnotation, getSupportedTypes, internalApplyAnnotation, internalApplyAnnotation, internalCleanAnnotation, isAttributePresent, isMetaDataAlreadyPresent, toShortString, toString
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.kernel.plugins.annotations.PropertyAware
applyAnnotation
 
Methods inherited from interface org.jboss.kernel.plugins.annotations.Annotation2ValueMetaDataAdapter
createValueMetaData, getAnnotation
 

Constructor Detail

PropertyAnnotationPlugin

protected PropertyAnnotationPlugin(Class<C> annotation)
Method Detail

isElementTypeSupported

protected boolean isElementTypeSupported(ElementType type)
Description copied from class: AbstractAnnotationPlugin
Is type supported by plugin.

Specified by:
isElementTypeSupported in class AbstractAnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C extends Annotation>
Parameters:
type - the annotation element type
Returns:
true if element supported

isMetaDataAlreadyPresent

protected boolean isMetaDataAlreadyPresent(org.jboss.beans.info.spi.PropertyInfo info,
                                           C annotation,
                                           BeanMetaData beanMetaData)
Description copied from class: AbstractAnnotationPlugin
Is meta data already present.

Overrides:
isMetaDataAlreadyPresent in class AbstractAnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C extends Annotation>
Parameters:
info - the info
annotation - the annotation
beanMetaData - the bean meta data
Returns:
true if meta data already present

internalApplyAnnotation

protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(org.jboss.beans.info.spi.PropertyInfo info,
                                                                      C annotation,
                                                                      KernelControllerContext context)
Description copied from class: AbstractAnnotationPlugin
Apply annotation since it's not present.

Overrides:
internalApplyAnnotation in class AbstractAnnotationPlugin<org.jboss.beans.info.spi.PropertyInfo,C extends Annotation>
Parameters:
info - the info
annotation - the annotation
context - the context
Returns:
list of added meta data visitor nodes

getPropertyMetaData

protected PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info,
                                               C annotation,
                                               KernelControllerContext context)
Get PropertyMetaData instance.

Parameters:
info - the info
annotation - the annotation
context - the context
Returns:
get new PropertyMetaData instance

getPropertyMetaData

protected PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info,
                                               C annotation,
                                               BeanMetaData beanMetaData)
Get PropertyMetaData instance.

Parameters:
info - the info
annotation - the annotation
beanMetaData - the bean metadata
Returns:
get new PropertyMetaData instance

getPropertyMetaData

protected PropertyMetaData getPropertyMetaData(org.jboss.beans.info.spi.PropertyInfo info,
                                               C annotation)
Get PropertyMetaData instance.

Parameters:
info - the info
annotation - the annotation
Returns:
get new PropertyMetaData instance

getProperties

protected Set<PropertyMetaData> getProperties(KernelControllerContext context)
Get the PropertyMetaData set.

Parameters:
context - the context
Returns:
set of existing PropertyMetaData


Copyright ? 2007 JBoss Inc.. All Rights Reserved.