org.jboss.kernel.plugins.annotations
Class InjectableMemberAnnotationPlugin<T extends org.jboss.reflect.spi.AnnotatedInfo,C extends Annotation>

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.kernel.plugins.annotations.BaseMetaDataAnnotationPlugin<T,C>
          extended by org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin<T,C>
              extended by org.jboss.kernel.plugins.annotations.InjectableMemberAnnotationPlugin<T,C>
Type Parameters:
T - the annotated info
C - annotation type
All Implemented Interfaces:
Cloneable, AnnotationPlugin<T,C>, MetaDataAnnotationPlugin<T,C>, org.jboss.util.JBossInterface
Direct Known Subclasses:
FieldAnnotationPlugin, PropertyAnnotationPlugin

public abstract class InjectableMemberAnnotationPlugin<T extends org.jboss.reflect.spi.AnnotatedInfo,C extends Annotation>
extends AbstractAnnotationPlugin<T,C>

Injectable member annotation plugin.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
protected InjectableMemberAnnotationPlugin(Class<C> annotation)
           
 
Method Summary
 ValueMetaData createValueMetaData(C annotation)
          Create value meta data.
protected  ValueMetaData createValueMetaData(C annotation, ValueMetaData previousValue)
          Create value meta data.
 ValueMetaData createValueMetaData(org.jboss.reflect.spi.ParameterInfo parameterInfo, C annotation, ValueMetaData previousValue)
          Create value meta data.
protected  ValueMetaData createValueMetaData(T info, C annotation)
          Create value meta data.
protected  ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type, C annotation)
          Create value metadata.
protected  ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type, C annotation, ValueMetaData previousValue)
          Create value metadata.
protected  PropertyMetaData findPropertyMetaData(T info, BeanMetaData beanMetaData)
          Find matching property metadata.
protected abstract  String getName(T info)
          Get the annotated info name.
protected  Set<PropertyMetaData> getProperties(BeanMetaData beanMetaData)
          Get the PropertyMetaData set.
protected  PropertyMetaData getPropertyMetaData(T info, C annotation)
          Get PropertyMetaData instance.
protected  PropertyMetaData getPropertyMetaData(T info, C annotation, BeanMetaData beanMetaData)
          Get PropertyMetaData instance.
protected  List<? extends MetaDataVisitorNode> internalApplyAnnotation(T info, C annotation, BeanMetaData beanMetaData)
          Covariant override.
protected  boolean isMetaDataAlreadyPresent(T info, C annotation, BeanMetaData beanMetaData)
          Is meta data already present.
protected  boolean isMetaDataComplete(PropertyMetaData pmd)
          Is property metadata complete.
 
Methods inherited from class org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin
applyAnnotation, checkIfNotAbstractBeanMetaDataSpecific, cleanAnnotation, internalApplyAnnotation, internalApplyAnnotation, internalCleanAnnotation, isMetaDataAlreadyPresent
 
Methods inherited from class org.jboss.kernel.plugins.annotations.BaseMetaDataAnnotationPlugin
applyAnnotation, getAnnotation, getSupportedTypes, isAttributePresent, isAttributePresent, isCleanup, isCleanupOnly, isElementTypeSupported, 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.MetaDataAnnotationPlugin
applyAnnotation, getAnnotation, getSupportedTypes
 

Constructor Detail

InjectableMemberAnnotationPlugin

protected InjectableMemberAnnotationPlugin(Class<C> annotation)
Method Detail

getName

protected abstract String getName(T info)
Get the annotated info name.

Parameters:
info - the info
Returns:
info's name

findPropertyMetaData

protected PropertyMetaData findPropertyMetaData(T info,
                                                BeanMetaData beanMetaData)
Find matching property metadata.

Parameters:
info - the property info
beanMetaData - the bean metadata
Returns:
matching property metadata or null

isMetaDataAlreadyPresent

protected boolean isMetaDataAlreadyPresent(T info,
                                           C annotation,
                                           BeanMetaData beanMetaData)
Description copied from class: BaseMetaDataAnnotationPlugin
Is meta data already present.

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

isMetaDataComplete

protected boolean isMetaDataComplete(PropertyMetaData pmd)
Is property metadata complete.

Parameters:
pmd - the property meta data
Returns:
true if metadata is complete

internalApplyAnnotation

protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(T info,
                                                                      C annotation,
                                                                      BeanMetaData beanMetaData)
                                                               throws Throwable
Description copied from class: AbstractAnnotationPlugin
Covariant override.

Overrides:
internalApplyAnnotation in class AbstractAnnotationPlugin<T extends org.jboss.reflect.spi.AnnotatedInfo,C extends Annotation>
Parameters:
info - the info
annotation - the annotation
beanMetaData - the bean meta data
Returns:
used to return covariant type
Throws:
Throwable - for any error

getPropertyMetaData

protected PropertyMetaData getPropertyMetaData(T 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(T info,
                                               C annotation)
Get PropertyMetaData instance.

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

getProperties

protected Set<PropertyMetaData> getProperties(BeanMetaData beanMetaData)
Get the PropertyMetaData set.

Parameters:
beanMetaData - the bean meta data
Returns:
set of existing PropertyMetaData

createValueMetaData

public ValueMetaData createValueMetaData(org.jboss.reflect.spi.ParameterInfo parameterInfo,
                                         C annotation,
                                         ValueMetaData previousValue)
Create value meta data.

Parameters:
parameterInfo - the parameter ifo
annotation - the annotation
previousValue - previous value
Returns:
value meta data

createValueMetaData

protected ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type,
                                            C annotation,
                                            ValueMetaData previousValue)
Create value metadata.

Parameters:
type - the type info
annotation - the annotation
previousValue - the previous value
Returns:
value metadata instance

createValueMetaData

protected ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type,
                                            C annotation)
Create value metadata.

Parameters:
type - the type info
annotation - the annotation
Returns:
value metadata instance

createValueMetaData

protected ValueMetaData createValueMetaData(T info,
                                            C annotation)
Create value meta data.

Parameters:
info - the info
annotation - the annotation
Returns:
value metadata

createValueMetaData

protected ValueMetaData createValueMetaData(C annotation,
                                            ValueMetaData previousValue)
Create value meta data.

Parameters:
annotation - the annotation
previousValue - previous value
Returns:
value meta data

createValueMetaData

public ValueMetaData createValueMetaData(C annotation)
Create value meta data.

Parameters:
annotation - the annotation
Returns:
value meta data


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.