- java.lang.Object
-
- jnr.ffi.util.AnnotationProxy<A>
-
- Type Parameters:
A- The annotation type has to be proxed.
- All Implemented Interfaces:
Annotation,InvocationHandler
public final class AnnotationProxy<A extends Annotation> extends Object implements Annotation, InvocationHandler
- Version:
- $Id$
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Annotation>annotationType()booleanequals(Object obj)ObjectgetProperty(String name)Returns the property value, given the name, if present.AgetProxedAnnotation()Returns the proxed annotation.inthashCode()Objectinvoke(Object proxy, Method method, Object[] args)static <A extends Annotation>
AnnotationProxy<A>newProxy(Class<A> annotationType)Creates a new annotation proxy.voidsetProperty(String name, Object value)Set a property value.StringtoString()
-
-
-
Method Detail
-
newProxy
public static <A extends Annotation> AnnotationProxy<A> newProxy(Class<A> annotationType)
Creates a new annotation proxy.- Type Parameters:
A- the annotation type has to be proxed.- Parameters:
annotationType- the annotation type class has to be proxed.- Returns:
- a new annotation proxy.
-
setProperty
public void setProperty(String name, Object value)
Set a property value.- Parameters:
name- the property name.value- the property value.
-
getProperty
public Object getProperty(String name)
Returns the property value, given the name, if present.- Parameters:
name- the property name.- Returns:
- the property value, given the name, if present.
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
annotationType
public Class<? extends Annotation> annotationType()
- Specified by:
annotationTypein interfaceAnnotation
-
getProxedAnnotation
public A getProxedAnnotation()
Returns the proxed annotation.- Returns:
- the proxed annotation.
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceAnnotation- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceAnnotation- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceAnnotation- Overrides:
toStringin classObject
-
-