|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.jaxb.javamodel.AnnotationProxy
public class AnnotationProxy
Purpose:The purpose of this class is to act as a dynamic proxy that allows JDK Annotation method calls to be made on a non Annotation object.
Responsibilities:
Map
of components (method name to value pairs)This class provides a means to invoke JDK Annotation method calls on a non Annotation instance.
Proxy
Method Summary | ||
---|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getComponents()
Return the Map of method name/value pairs for this proxy
instance. |
|
static
|
getProxy(java.util.Map<java.lang.String,java.lang.Object> components,
java.lang.Class<A> annoClass,
java.lang.ClassLoader cl,
org.eclipse.persistence.internal.helper.ConversionManager conversionMgr)
This is the preferred way to obtain an instance of a dynamic proxy. |
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Invoke a given Method on this proxy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <A extends java.lang.annotation.Annotation> A getProxy(java.util.Map<java.lang.String,java.lang.Object> components, java.lang.Class<A> annoClass, java.lang.ClassLoader cl, org.eclipse.persistence.internal.helper.ConversionManager conversionMgr)
ClassLoader
(which is used to load the
target Annotation
), a Class
(which indicates
the target Annotation
, i.e.
javax.xml.bind.annotation.XmlElement.class)
, and a
Map
of method name to value pairs, which represent the
method names on the Annotation
and the values that are to be
returned from each method call. For example, if this proxy is to be used
for an @XmlElement
, the Map
should contain the
following keys:
components
- Map
of method name/value pairs for this proxy
instanceannoClass
- The interface for the proxy class to implementcl
- The ClassLoader
to define the proxy classconversionMgr
- ConversionManager
instance for converting to the
correct return type in the invoke
method
public java.util.Map<java.lang.String,java.lang.Object> getComponents()
Map
of method name/value pairs for this proxy
instance.
Map
of method name/value pairs for this proxy
instancepublic java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
Method
on this proxy. The component
Map
will be accessed using the given Method
's
name, and if an entry exists, the associated value is returned.
invoke
in interface java.lang.reflect.InvocationHandler
proxy
- Satisfy the InvocationHandler
interface - not
usedmethod
- The Method
instance corresponding to the
interface method invoked on the proxy instanceargs
- Satisfy the InvocationHandler
interface - not
used
java.lang.Throwable
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |