Package gnu.bytecode
Class AnnotationEntry
- java.lang.Object
-
- gnu.bytecode.AnnotationEntry
-
- All Implemented Interfaces:
java.lang.annotation.Annotation,java.lang.reflect.InvocationHandler
public class AnnotationEntry extends java.lang.Object implements java.lang.reflect.InvocationHandler, java.lang.annotation.AnnotationAn annotation value mirror.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotationEntry.Value
-
Constructor Summary
Constructors Constructor Description AnnotationEntry()AnnotationEntry(ClassType annotationType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMember(java.lang.String name, AnnotationEntry.Value value)voidaddMember(java.lang.String name, java.lang.Object value, Type type)java.lang.Class<? extends java.lang.annotation.Annotation>annotationType()static AnnotationEntry.ValueasAnnotationValue(java.lang.Object val, Type type)booleanequals(java.lang.Object obj)ClassTypegetAnnotationType()java.lang.annotation.RetentionPolicygetRetention()inthashCode()booleanhasTarget(java.lang.annotation.ElementType etype)Is there is a@Targetmeta-annotation that includes the parameter? If the annotationType has no@Targetmeta-annotation, return true, since in that case the annotation type is allowed in all contexts.java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)voidprint(int indentation, ClassTypeWriter dst)java.lang.StringtoString()
-
-
-
Constructor Detail
-
AnnotationEntry
public AnnotationEntry()
-
AnnotationEntry
public AnnotationEntry(ClassType annotationType)
-
-
Method Detail
-
getRetention
public java.lang.annotation.RetentionPolicy getRetention()
-
hasTarget
public boolean hasTarget(java.lang.annotation.ElementType etype)
Is there is a@Targetmeta-annotation that includes the parameter? If the annotationType has no@Targetmeta-annotation, return true, since in that case the annotation type is allowed in all contexts. Ifetype==null, return false iff there is a@Targetmeta-annotation.
-
getAnnotationType
public ClassType getAnnotationType()
-
addMember
public void addMember(java.lang.String name, AnnotationEntry.Value value)
-
addMember
public void addMember(java.lang.String name, java.lang.Object value, Type type)
-
asAnnotationValue
public static AnnotationEntry.Value asAnnotationValue(java.lang.Object val, Type type)
-
annotationType
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
- Specified by:
annotationTypein interfacejava.lang.annotation.Annotation
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.lang.annotation.Annotation- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.lang.annotation.Annotation- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfacejava.lang.annotation.Annotation- Overrides:
toStringin classjava.lang.Object
-
print
public void print(int indentation, ClassTypeWriter dst)
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler
-
-