Package jnr.ffi.util
Class AnnotationProxy<A extends Annotation>
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
Modifier and TypeMethodDescriptionClass<? extends Annotation>booleangetProperty(String name) Returns the property value, given the name, if present.Returns the proxed annotation.inthashCode()static <A extends Annotation>
AnnotationProxy<A>Creates a new annotation proxy.voidsetProperty(String name, Object value) Set a property value.toString()
-
Method Details
-
newProxy
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
Set a property value.- Parameters:
name- the property name.value- the property value.
-
getProperty
Returns the property value, given the name, if present.- Parameters:
name- the property name.- Returns:
- the property value, given the name, if present.
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
annotationType
- Specified by:
annotationTypein interfaceAnnotation
-
getProxedAnnotation
Returns the proxed annotation.- Returns:
- the proxed annotation.
-
equals
- Specified by:
equalsin interfaceAnnotation- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceAnnotation- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfaceAnnotation- Overrides:
toStringin classObject
-