net.sourceforge.retroweaver.runtime.java.lang.annotation
Class AIB
java.lang.Object
net.sourceforge.retroweaver.runtime.java.lang.annotation.AIB
public class AIB
- extends java.lang.Object
The Annotation Information Block.
This is the runtime data structure that holds all of the annotation data in
a form that Retroweaver's runtime can use easily. At weave time, we create
a public static transient field named [ANNOTATIONS_FIELD] of this type. At
runtime, we parse the class file, read the annotation data, and populate this
data structure.
( Method parameter annotations appear in the same order as method parameters,
and each parameter gets its own list of Annotations )
- Author:
- Toby Reyelts
Method Summary |
static AIB |
getAib(java.lang.Class c)
Returns the AIB for the class. |
|
getClassAnnotation(java.lang.Class<T> annotationType)
|
Annotation[] |
getClassAnnotations()
|
Annotation[] |
getDeclaredClassAnnotations()
|
java.lang.Object |
getDefaultValue(java.lang.String methodName)
|
|
getFieldAnnotation(java.lang.String fieldName,
java.lang.Class<T> annotationType)
|
Annotation[] |
getFieldAnnotations(java.lang.String fieldName)
|
|
getMethodAnnotation(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType,
java.lang.Class<T> annotationType)
|
Annotation[] |
getMethodAnnotations(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
|
Annotation[][] |
getMethodParameterAnnotations(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
|
void |
visit(int version,
int access,
java.lang.String name,
java.lang.String signature,
java.lang.String superName,
java.lang.String[] interfaces)
|
AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
|
void |
visitAttribute(Attribute attr)
|
void |
visitEnd()
|
FieldVisitor |
visitField(int access,
java.lang.String fieldName,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
|
void |
visitInnerClass(java.lang.String name,
java.lang.String outerName,
java.lang.String innerName,
int access)
|
MethodVisitor |
visitMethod(int access,
java.lang.String methodName,
java.lang.String desc,
java.lang.String signature,
java.lang.String[] exceptions)
|
void |
visitOuterClass(java.lang.String owner,
java.lang.String name,
java.lang.String desc)
|
void |
visitSource(java.lang.String source,
java.lang.String debug)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_VISITOR
public static final AIB.AIBEmptyVisitor EMPTY_VISITOR
getClassAnnotations
public Annotation[] getClassAnnotations()
getDeclaredClassAnnotations
public Annotation[] getDeclaredClassAnnotations()
getClassAnnotation
public <T extends Annotation> T getClassAnnotation(java.lang.Class<T> annotationType)
getFieldAnnotations
public Annotation[] getFieldAnnotations(java.lang.String fieldName)
getFieldAnnotation
public <T extends Annotation> T getFieldAnnotation(java.lang.String fieldName,
java.lang.Class<T> annotationType)
getMethodAnnotations
public Annotation[] getMethodAnnotations(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
getMethodAnnotation
public <T extends Annotation> T getMethodAnnotation(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType,
java.lang.Class<T> annotationType)
getDefaultValue
public java.lang.Object getDefaultValue(java.lang.String methodName)
getMethodParameterAnnotations
public Annotation[][] getMethodParameterAnnotations(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
getAib
public static AIB getAib(java.lang.Class c)
- Returns the AIB for the class.
visitAnnotation
public AnnotationVisitor visitAnnotation(java.lang.String desc,
boolean visible)
visitField
public FieldVisitor visitField(int access,
java.lang.String fieldName,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
visitMethod
public MethodVisitor visitMethod(int access,
java.lang.String methodName,
java.lang.String desc,
java.lang.String signature,
java.lang.String[] exceptions)
visit
public void visit(int version,
int access,
java.lang.String name,
java.lang.String signature,
java.lang.String superName,
java.lang.String[] interfaces)
visitSource
public void visitSource(java.lang.String source,
java.lang.String debug)
visitOuterClass
public void visitOuterClass(java.lang.String owner,
java.lang.String name,
java.lang.String desc)
visitAttribute
public void visitAttribute(Attribute attr)
visitInnerClass
public void visitInnerClass(java.lang.String name,
java.lang.String outerName,
java.lang.String innerName,
int access)
visitEnd
public void visitEnd()