T
- the annotation typepublic abstract class AnnotationLiteral<T extends java.lang.annotation.Annotation>
extends java.lang.Object
implements java.lang.annotation.Annotation, java.io.Serializable
Supports inline instantiation of annotation type instances.
Reflection operations are using SecurityActions
utility class to support security manager.
An instance of an annotation type may be obtained by subclassing AnnotationLiteral.
public abstract class PayByQualifier extends AnnotationLiteral<PayBy> implements PayBy { }
PayBy payByCheque = new PayByQualifier() { public PaymentMethod value() { return CHEQUE; } };
Instance.select(Annotation...)
,
Event.select(Annotation...)
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
AnnotationLiteral() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType() |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
java.lang.String |
toString() |
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
annotationType
in interface java.lang.annotation.Annotation
public java.lang.String toString()
toString
in interface java.lang.annotation.Annotation
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in interface java.lang.annotation.Annotation
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.lang.annotation.Annotation
hashCode
in class java.lang.Object