Class AnnotationLiteral<T extends Annotation>
java.lang.Object
org.glassfish.jersey.internal.inject.AnnotationLiteral<T>
- Type Parameters:
T
- the annotation type
- All Implemented Interfaces:
Serializable
,Annotation
- Direct Known Subclasses:
BackgroundSchedulerLiteral
,ClientAsyncExecutorLiteral
,ClientBackgroundSchedulerLiteral
,CustomAnnotationLiteral
,ManagedAsyncExecutorLiteral
,NamedImpl
public abstract class AnnotationLiteral<T extends Annotation>
extends Object
implements Annotation, Serializable
Supports inline instantiation of annotation type instances.
An instance of an annotation type may be obtained by subclassing AnnotationLiteral.
public abstract class PayByQualifier extends AnnotationLiteral<PayBy> implements PayBy {}An extension of AnnotationLiteral must do two things:
- Must have the target annotation as its generic type
- Must implement the target type
- Author:
- jwells
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Annotation>
Method returns the type of the annotation literal.boolean
int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.annotation.Annotation
toString
-
Constructor Details
-
AnnotationLiteral
protected AnnotationLiteral()
-
-
Method Details
-
annotationType
Method returns the type of the annotation literal. The value is resolved lazily during the first call of this method.- Specified by:
annotationType
in interfaceAnnotation
- Returns:
- annotation type of this literal.
-
equals
- Specified by:
equals
in interfaceAnnotation
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceAnnotation
- Overrides:
hashCode
in classObject
-