Javassist 3.15.0-GA-redhat-2

javassist.bytecode.annotation
Class AnnotationImpl

java.lang.Object
  extended by javassist.bytecode.annotation.AnnotationImpl
All Implemented Interfaces:
InvocationHandler

public class AnnotationImpl
extends Object
implements 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
 Annotation getAnnotation()
          Obtains the internal data structure representing the annotation.
 String getTypeName()
          Obtains the name of the annotation type.
 int hashCode()
          Returns a hash code value for this object.
 Object invoke(Object proxy, Method method, Object[] args)
          Executes a method invocation on a proxy instance.
static Object make(ClassLoader cl, Class clazz, ClassPool cp, Annotation anon)
          Constructs an annotation object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

make

public static Object make(ClassLoader cl,
                          Class clazz,
                          ClassPool cp,
                          Annotation anon)
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

getTypeName

public String getTypeName()
Obtains the name of the annotation type.

Returns:
the type name

getAnnotation

public Annotation getAnnotation()
Obtains the internal data structure representing the annotation.

Returns:
the annotation

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Executes a method invocation on a proxy instance. The implementations of toString(), equals(), and hashCode() are directly supplied by the AnnotationImpl. The annotationType() method is also available on the proxy instance.

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object

Javassist 3.15.0-GA-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.