T - the annotation typepublic abstract class AnnotationLiteral<T extends Annotation> extends Object implements Annotation, 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 Form| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationLiteral() |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Annotation> |
annotationType() |
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString() |
public Class<? extends Annotation> annotationType()
annotationType in interface Annotationpublic String toString()
toString in interface AnnotationtoString in class Objectpublic boolean equals(Object other)
equals in interface Annotationequals in class Objectpublic int hashCode()
hashCode in interface AnnotationhashCode in class ObjectComments to: cdi-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.