org.jboss.deployers.spi.deployer.helpers
Class AbstractAnnotationProcessor<A extends Annotation,T>

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.AbstractAnnotationProcessor<A,T>
Type Parameters:
A - the annotation type
T - the output type
All Implemented Interfaces:
AnnotationProcessor<A,T>

public abstract class AbstractAnnotationProcessor<A extends Annotation,T>
extends Object
implements AnnotationProcessor<A,T>

Abstract annotation processor.

Author:
Ales Justin

Constructor Summary
AbstractAnnotationProcessor()
           
 
Method Summary
 T createMetaData(Object attachment)
          Create metadata attachment.
 T createMetaDataFromClass(Class<?> clazz)
          Create metadata from class.
protected abstract  T createMetaDataFromClass(Class<?> clazz, A annotation)
          Create metadata from class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.spi.deployer.helpers.AnnotationProcessor
getAnnotation, getOutput
 

Constructor Detail

AbstractAnnotationProcessor

public AbstractAnnotationProcessor()
Method Detail

createMetaData

public T createMetaData(Object attachment)
Description copied from interface: AnnotationProcessor
Create metadata attachment.

Specified by:
createMetaData in interface AnnotationProcessor<A extends Annotation,T>
Parameters:
attachment - the previous attachment
Returns:
the new metadata instance or null if cannot be created

createMetaDataFromClass

public T createMetaDataFromClass(Class<?> clazz)
Description copied from interface: AnnotationProcessor
Create metadata from class.

Specified by:
createMetaDataFromClass in interface AnnotationProcessor<A extends Annotation,T>
Parameters:
clazz - the class containing annotation
Returns:
the new metadata from class or null if cannot be created

createMetaDataFromClass

protected abstract T createMetaDataFromClass(Class<?> clazz,
                                             A annotation)
Create metadata from class.

Parameters:
clazz - the class
annotation - the annotation instance on a class
Returns:
new metadata instance of null if cannot be created


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