JBoss MetaData Repository 2.2.0.SP1

org.jboss.annotation.factory
Class AnnotationCreator

java.lang.Object
  extended by org.jboss.annotation.factory.AnnotationCreator
All Implemented Interfaces:
AnnotationParserVisitor

public class AnnotationCreator
extends Object
implements AnnotationParserVisitor

Comment

Version:
$Revision: 88878 $
Author:
Bill Burke, Kabir Khan, Ales Justin

Field Summary
 Object typeValue
           
 
Constructor Summary
AnnotationCreator(Class<?> annotation, Class<?> type)
           
AnnotationCreator(Class<?> annotation, Class<?> type, ClassLoader loader)
           
 
Method Summary
static Object createAnnotation(ASTAnnotation node, Class<?> annotation)
          Create annotation.
static Object createAnnotation(ASTAnnotation node, Class<?> annotation, ClassLoader cl)
           
static Object createAnnotation(String annotationExpr, Class<?> annotation)
          Create annotation.
static Object createAnnotation(String annotationExpr, Class<?> annotation, boolean replace)
          Create annotation.
static Object createAnnotation(String annotationExpr, Class<?> annotation, Properties properties)
          Create annotation.
static Object createAnnotation(String annotationExpr, ClassLoader cl)
          Create annotation.
static Object createAnnotation(String annotationExpr, ClassLoader cl, boolean replace)
          Create annotation.
static Object createAnnotation(String annotationExpr, ClassLoader cl, Properties properties)
          Create annotation.
 Object visit(ASTAnnotation node, Object data)
           
 Object visit(ASTChar node, Object data)
           
 Object visit(ASTIdentifier node, Object data)
           
 Object visit(ASTMemberValueArrayInitializer node, Object data)
           
 Object visit(ASTMemberValuePair node, Object data)
           
 Object visit(ASTMemberValuePairs node, Object data)
           
 Object visit(ASTSingleMemberValue node, Object data)
           
 Object visit(ASTStart node, Object data)
           
 Object visit(ASTString node, Object data)
           
 Object visit(SimpleNode node, Object data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeValue

public Object typeValue
Constructor Detail

AnnotationCreator

public AnnotationCreator(Class<?> annotation,
                         Class<?> type,
                         ClassLoader loader)

AnnotationCreator

public AnnotationCreator(Class<?> annotation,
                         Class<?> type)
Method Detail

visit

public Object visit(ASTMemberValuePairs node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTMemberValuePair node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTSingleMemberValue node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTIdentifier node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTString node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTChar node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTMemberValueArrayInitializer node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTAnnotation node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(SimpleNode node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

visit

public Object visit(ASTStart node,
                    Object data)
Specified by:
visit in interface AnnotationParserVisitor

createAnnotation

public static Object createAnnotation(ASTAnnotation node,
                                      Class<?> annotation,
                                      ClassLoader cl)
                               throws Exception
Throws:
Exception

createAnnotation

public static Object createAnnotation(ASTAnnotation node,
                                      Class<?> annotation)
                               throws Exception
Create annotation.

Parameters:
node - the ast annotation node
annotation - the annotation class
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      Class<?> annotation)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
annotation - the annotation class
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      ClassLoader cl)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
cl - the classloader to use
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      Class<?> annotation,
                                      boolean replace)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
annotation - the annotation class
replace - should we replace possible properties in expression
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      ClassLoader cl,
                                      boolean replace)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
cl - the classloader to use
replace - should we replace possible properties in expression
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      Class<?> annotation,
                                      Properties properties)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
annotation - the annotation class
properties - the properties to use for replacement
Returns:
new annotation instance
Throws:
Exception - for any error

createAnnotation

public static Object createAnnotation(String annotationExpr,
                                      ClassLoader cl,
                                      Properties properties)
                               throws Exception
Create annotation.

Parameters:
annotationExpr - the annotation expression
cl - the classloader to use
properties - the properties to use for replacement
Returns:
new annotation instance
Throws:
Exception - for any error

JBoss MetaData Repository 2.2.0.SP1

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