Package javassist.bytecode.annotation
Class AnnotationImpl
java.lang.Object
javassist.bytecode.annotation.AnnotationImpl
- All Implemented Interfaces:
InvocationHandler
Internal-use only. This is a helper class internally used for implementing
toAnnotationType() in Annotation.- Author:
- Shigeru Chiba, Bill Burke, Adrian Brock
-
Method Summary
Modifier and TypeMethodDescriptionObtains the internal data structure representing the annotation.Obtains the name of the annotation type.inthashCode()Returns a hash code value for this object.Executes a method invocation on a proxy instance.static Objectmake(ClassLoader cl, Class<?> clazz, ClassPool cp, Annotation anon) Constructs an annotation object.
-
Method Details
-
make
public static Object make(ClassLoader cl, Class<?> clazz, ClassPool cp, Annotation anon) throws IllegalArgumentException Constructs an annotation object.- Parameters:
cl- class loader for obtaining annotation types.clazz- the annotation type.cp- class pool for containing an annotation type (or null).anon- the annotation.- Returns:
- the annotation
- Throws:
IllegalArgumentException
-
getTypeName
Obtains the name of the annotation type.- Returns:
- the type name
-
getAnnotation
Obtains the internal data structure representing the annotation.- Returns:
- the annotation
-
invoke
Executes a method invocation on a proxy instance. The implementations oftoString(),equals(), andhashCode()are directly supplied by theAnnotationImpl. TheannotationType()method is also available on the proxy instance.- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
hashCode
public int hashCode()Returns a hash code value for this object.
-