org.jboss.kernel.plugins.annotations
Class ConstructorValueAnnotationPlugin<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<org.jboss.reflect.spi.ClassInfo,C>
              extended by org.jboss.kernel.plugins.annotations.ClassAnnotationPlugin<C>
                  extended by org.jboss.kernel.plugins.annotations.ConstructorValueAnnotationPlugin<C>
Type Parameters:
C - annotation type
All Implemented Interfaces:
Cloneable, Annotation2ValueMetaDataAdapter<C>, AnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C>, MetaDataAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C>, org.jboss.util.JBossInterface
Direct Known Subclasses:
ArrayConstructorValueAnnotationPlugin, CollectionConstructorValueAnnotationPlugin, InjectConstructorValueAnnotationPlugin, ListConstructorValueAnnotationPlugin, MapConstructorValueAnnotationPlugin, SetConstructorValueAnnotationPlugin, StringValueConstructorValueAnnotationPlugin, ValueFactoryConstructorValueAnnotationPlugin

public abstract class ConstructorValueAnnotationPlugin<C extends Annotation>
extends ClassAnnotationPlugin<C>
implements Annotation2ValueMetaDataAdapter<C>

Constructor value annotation plugin.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
protected ConstructorValueAnnotationPlugin(Class<C> annotation)
           
 
Method Summary
protected abstract  ValueMetaData createValueMetaData(C annotation)
          Create the value metadata from annotation.
 ValueMetaData createValueMetaData(C annotation, ValueMetaData previousValue)
          Create value metadata.
 ValueMetaData createValueMetaData(org.jboss.reflect.spi.ParameterInfo parameterInfo, C annotation, ValueMetaData previousValue)
          Create ValueMetaData instance.
 ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type, C annotation)
          Create value metadata.
 ValueMetaData createValueMetaData(org.jboss.reflect.spi.TypeInfo type, C annotation, ValueMetaData previousValue)
          Create value metadata.
protected  List<? extends MetaDataVisitorNode> internalApplyAnnotation(org.jboss.reflect.spi.ClassInfo info, org.jboss.metadata.spi.MetaData retrieval, C annotation, KernelControllerContext context)
          Apply annotation since it's not present.
protected  boolean isMetaDataAlreadyPresent(org.jboss.reflect.spi.ClassInfo info, C annotation, BeanMetaData beanMetaData)
          Is meta data already present.
 
Methods inherited from class org.jboss.kernel.plugins.annotations.ClassAnnotationPlugin
isElementTypeSupported
 
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, 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.Annotation2ValueMetaDataAdapter
getAnnotation
 
Methods inherited from interface org.jboss.kernel.plugins.annotations.MetaDataAnnotationPlugin
applyAnnotation, getAnnotation, getSupportedTypes
 

Constructor Detail

ConstructorValueAnnotationPlugin

protected ConstructorValueAnnotationPlugin(Class<C> annotation)
Method Detail

isMetaDataAlreadyPresent

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

Overrides:
isMetaDataAlreadyPresent in class BaseMetaDataAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,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.reflect.spi.ClassInfo info,
                                                                      org.jboss.metadata.spi.MetaData retrieval,
                                                                      C annotation,
                                                                      KernelControllerContext context)
                                                               throws Throwable
Description copied from class: AbstractAnnotationPlugin
Apply annotation since it's not present.

Overrides:
internalApplyAnnotation in class AbstractAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C extends Annotation>
Parameters:
info - the info
retrieval - the metadata
annotation - the annotation
context - the context
Returns:
list of added meta data visitor nodes
Throws:
Throwable - for any error

createValueMetaData

public ValueMetaData createValueMetaData(org.jboss.reflect.spi.ParameterInfo parameterInfo,
                                         C annotation,
                                         ValueMetaData previousValue)
Description copied from interface: Annotation2ValueMetaDataAdapter
Create ValueMetaData instance.

Specified by:
createValueMetaData in interface Annotation2ValueMetaDataAdapter<C extends Annotation>
Parameters:
parameterInfo - the parameter info
annotation - the annotation instance
previousValue - previous value
Returns:
new ValueMetaData instance

createValueMetaData

public 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

public 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

public ValueMetaData createValueMetaData(C annotation,
                                         ValueMetaData previousValue)
Create value metadata.

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

createValueMetaData

protected abstract ValueMetaData createValueMetaData(C annotation)
Create the value metadata from annotation.

Parameters:
annotation - the annotation
Returns:
new value metadata


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