org.apache.webbeans.config
Class DefaultAnnotation

java.lang.Object
  extended by org.apache.webbeans.config.DefaultAnnotation
All Implemented Interfaces:
Annotation, InvocationHandler

public class DefaultAnnotation
extends Object
implements InvocationHandler, Annotation

A small helper class to create a Annotation instance of the given annotation class via Proxy. The annotation literal gets filled with the default values. TODO implement class caching!


Method Summary
 Class<? extends Annotation> annotationType()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
static Annotation of(Class<? extends Annotation> annotation)
           
 String toString()
          Copied from javax.enterprise.util.AnnotationLiteral#toString() with minor changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.annotation.Annotation
equals, hashCode
 

Method Detail

of

public static Annotation of(Class<? extends Annotation> annotation)

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

annotationType

public Class<? extends Annotation> annotationType()
Specified by:
annotationType in interface Annotation

toString

public String toString()
Copied from javax.enterprise.util.AnnotationLiteral#toString() with minor changes.

Specified by:
toString in interface Annotation
Overrides:
toString in class Object
Returns:


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.