JBoss MetaData Repository 2.2.0.SP1

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.

Author:
Bill Burke, Kabir Khan, Ales Justin
See Also:
Serialized Form

Constructor Summary
AnnotationProxy(Class<?> annotationType, Map valueMap)
           
 
Method Summary
static Object createProxy(Map<String,Object> map, Class<?> annotation)
          Create a proxy implementation for the annotation class.
protected  org.jboss.beans.info.spi.BeanInfo getBeanInfo()
          Get bean info.
 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

getBeanInfo

protected org.jboss.beans.info.spi.BeanInfo getBeanInfo()
Get bean info.

Returns:
the annotation's bean info

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<String,Object> 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

JBoss MetaData Repository 2.2.0.SP1

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.