| Modifier and Type | Field and Description |
|---|---|
| private final Class | annotationType
The annotation type class has to be proxed. |
| private static final int | MEMBER_NAME_MULTIPLICATOR
The multiplicator required in the hash code calculation. |
| private final Map | properties
The annotation properties registry. |
| private final A | proxedAnnotation
The proxed annotation. |
| Access | Constructor and Description |
|---|---|
| private | AnnotationProxy(Class<A>
the annotation type class has to be proxed. annotationType)Build a new proxy annotation given the annotation type. |
| Modifier and Type | Method and Description |
|---|---|
| public Class | annotationType()
Implements java. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Implements java. |
| private static AnnotationProxy | Returns: the annotation proxy, if any, given the annotation.the annotation. obj)Retrieves the annotation proxy, if any, given the annotation. |
| private static < the annotation type. A extends Annotation> Method[] | Returns: the declared methods of an annotation, given the type.the annotation type class. annotationType)Access to the declared methods of an annotation, given the type. |
| public Object | Returns: the property value, given the name, if present.the property name. name)Returns the property value, given the name, if present. |
| public A | |
| public int | hashCode()
Overrides java. Implements java. |
| public Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean.Implements java. |
| public static < the annotation type has to be proxed. A extends Annotation> AnnotationProxy | |
| public void | |
| public String | toString()
Overrides java. Implements java. |
| annotationType | back to summary |
|---|---|
| private final Class<A> annotationType The annotation type class has to be proxed. | |
| MEMBER_NAME_MULTIPLICATOR | back to summary |
|---|---|
| private static final int MEMBER_NAME_MULTIPLICATOR The multiplicator required in the hash code calculation. | |
| properties | back to summary |
|---|---|
| private final Map<String, AnnotationProperty> properties The annotation properties registry. | |
| proxedAnnotation | back to summary |
|---|---|
| private final A proxedAnnotation The proxed annotation. | |
| AnnotationProxy | back to summary |
|---|---|
| private AnnotationProxy(Class<A> annotationType) Build a new proxy annotation given the annotation type.
| |
| annotationType | back to summary |
|---|---|
| public Class Implements java. Doc from java. Returns the annotation interface of this annotation.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements java. Doc from java. Returns true if the specified object represents an annotation that is logically equivalent to this one. In other words, returns true if the specified object is an instance of the same annotation interface as this instance, all of whose members are equal to the corresponding member of this annotation, as defined below:
| |
| getAnnotationProxy | back to summary |
|---|---|
| private static AnnotationProxy Retrieves the annotation proxy, if any, given the annotation.
| |
| getDeclaredMethods | back to summary |
|---|---|
| private static <A extends Annotation> Method[] getDeclaredMethods(final Class<A> annotationType) Access to the declared methods of an annotation, given the type. | |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) Returns the property value, given the name, if present. | |
| getProxedAnnotation | back to summary |
|---|---|
| public A getProxedAnnotation() Returns the proxed annotation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code of this annotation. The hash code of an annotation is the sum of the hash codes
of its members (including those with default values).
The hash code of an annotation member is (127 times the hash code
of the member-name as computed by
| |
| invoke | back to summary |
|---|---|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
| |
| newProxy | back to summary |
|---|---|
| public static <A extends Annotation> AnnotationProxy Creates a new annotation proxy.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object value) Set a property value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Doc from java. Returns a string representation of this annotation. The details of the representation are implementation-dependent, but the following may be regarded as typical: @com.example.Name(first="Duke", middle="of", last="Java") | |