| java.lang.Object org.codehaus.aspectwerkz.annotation.expression.AnnotationVisitor
AnnotationVisitor | public class AnnotationVisitor implements AnnotationParserVisitor(Code) | | Parse a source-like annotation representation to feed a map of AnnotationElement which
contain holder to actual values. Class and type referenced are holded behind lazy
wrapper that won't load them unless used.
Note that this parser will trigger class loading to ensure type consistency
[change to ASMClassInfo instead of reflect if embedded parsing needed]
Note: the loader used here is the one from the annotation class and not the one from annotated element
That does not matter since parse time is a build time operation for now.
author: Jonas Bonér author: Alexandre Vasseur |
Constructor Summary | |
public | AnnotationVisitor(Map annotationElementValueHoldersByName, Class annotationClass) Creates a new visitor. |
Method Summary | |
public static void | parse(Map annotationElements, String annotationRepresentation, Class annotationClass) Parse the given annotationRepresentation (@XXX(...)) to feed the given annotationElements map,
based on the annotationClass annotation interface. | public Object | visit(SimpleNode node, Object data) | public Object | visit(ASTRoot node, Object data) | public Object | visit(ASTAnnotation node, Object data) | public Object | visit(ASTKeyValuePair node, Object data) | public Object | visit(ASTArray node, Object data) | public Object | visit(ASTIdentifier node, Object data) | public Object | visit(ASTBoolean node, Object data) | public Object | visit(ASTChar node, Object data) | public Object | visit(ASTString node, Object data) | public Object | visit(ASTInteger node, Object data) | public Object | visit(ASTFloat node, Object data) | public Object | visit(ASTHex node, Object data) | public Object | visit(ASTOct node, Object data) |
m_annotationClass | protected Class m_annotationClass(Code) | | We reference class at parse time. We don't need to avoid reflection.
|
m_annotationElementValueHoldersByName | protected Map m_annotationElementValueHoldersByName(Code) | | |
AnnotationVisitor | public AnnotationVisitor(Map annotationElementValueHoldersByName, Class annotationClass)(Code) | | Creates a new visitor.
|
parse | public static void parse(Map annotationElements, String annotationRepresentation, Class annotationClass)(Code) | | Parse the given annotationRepresentation (@XXX(...)) to feed the given annotationElements map,
based on the annotationClass annotation interface.
Parameters: annotationElements - Parameters: annotationRepresentation - Parameters: annotationClass - |
|
|