Module jakarta.cdi
Package jakarta.enterprise.util
Class AnnotationLiteral<T extends java.lang.annotation.Annotation>
- java.lang.Object
- 
- jakarta.enterprise.util.AnnotationLiteral<T>
 
- 
- Type Parameters:
- T- the annotation type
 - All Implemented Interfaces:
- java.io.Serializable,- java.lang.annotation.Annotation
 - Direct Known Subclasses:
- Alternative.Literal,- Any.Literal,- ApplicationScoped.Literal,- BeforeDestroyed.Literal,- ConversationScoped.Literal,- Default.Literal,- Dependent.Literal,- Destroyed.Literal,- Initialized.Literal,- InjectLiteral,- NamedLiteral,- Nonbinding.Literal,- QualifierLiteral,- RequestScoped.Literal,- SessionScoped.Literal,- SingletonLiteral,- Specializes.Literal,- TransientReference.Literal,- Typed.Literal,- Vetoed.Literal
 
 public abstract class AnnotationLiteral<T extends java.lang.annotation.Annotation> extends java.lang.Object implements java.lang.annotation.Annotation, java.io.SerializableSupports inline instantiation of annotation type instances. Reflection operations are using SecurityActionsutility 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; } };- Author:
- Pete Muir, Gavin King, Marko Luksa, Antoine Sabot-Durand
- See Also:
- Instance.select(Annotation...),- Event.select(Annotation...), Serialized Form
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAnnotationLiteral()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends java.lang.annotation.Annotation>annotationType()booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
annotationTypepublic java.lang.Class<? extends java.lang.annotation.Annotation> annotationType() - Specified by:
- annotationTypein interface- java.lang.annotation.Annotation
 
 - 
toStringpublic java.lang.String toString() - Specified by:
- toStringin interface- java.lang.annotation.Annotation
- Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object other) - Specified by:
- equalsin interface- java.lang.annotation.Annotation
- Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- java.lang.annotation.Annotation
- Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-