org.jboss.annotation.factory
Class AnnotationProxy

java.lang.Object
  extended by org.jboss.annotation.factory.AnnotationProxy
All Implemented Interfaces:
Serializable, InvocationHandler
Direct Known Subclasses:
AnnotationProxy

public class AnnotationProxy
extends Object
implements InvocationHandler, Serializable

InvocationHandler implementation for creating an annotation proxy.

Version:
$Revision: 68391 $
Author:
Bill Burke, Kabir Khan
See Also:
Serialized Form

Constructor Summary
AnnotationProxy(Class annotationType, Map valueMap)
           
 
Method Summary
static Object createProxy(Map map, Class annotation)
          Create a proxy implementation for the annotation class.
 Object getValue(String name)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationProxy

public AnnotationProxy(Class annotationType,
                       Map valueMap)
Method Detail

invoke

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

getValue

public Object getValue(String name)

createProxy

public static Object createProxy(Map map,
                                 Class annotation)
                          throws Exception
Create a proxy implementation for the annotation class.

Parameters:
map - - map of the annotation values
annotation - - the annotation class
Returns:
an instance implementing the annotation
Throws:
Exception - for any error


Copyright © 2008 JBoss Inc.. All Rights Reserved.