Package org.glassfish.hk2.api
Class AnnotationLiteral<T extends Annotation>
java.lang.Object
org.glassfish.hk2.api.AnnotationLiteral<T>
- Type Parameters:
T
- the annotation type
- All Implemented Interfaces:
Serializable
,Annotation
- Direct Known Subclasses:
NamedImpl
,RunLevelServiceUtilities.RunLevelImpl
,ServiceLocatorUtilities.ImmediateImpl
,ServiceLocatorUtilities.InheritableThreadImpl
,ServiceLocatorUtilities.PerLookupImpl
,ServiceLocatorUtilities.PerThreadImpl
,ServiceLocatorUtilities.SingletonImpl
,UnqualifiedImpl
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
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends Annotation> boolean
private static Class
<?> getAnnotationLiteralSubclass
(Class<?> clazz) private Method[]
private static <T> Class
<T> getTypeParameter
(Class<?> annotationLiteralSuperclass) int
hashCode()
private static Object
private static void
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization- See Also:
-
annotationType
-
members
-
-
Constructor Details
-
AnnotationLiteral
protected AnnotationLiteral()
-
-
Method Details
-
getMembers
-
getAnnotationLiteralSubclass
-
getTypeParameter
-
annotationType
- Specified by:
annotationType
in interfaceAnnotation
-
equals
- Specified by:
equals
in interfaceAnnotation
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceAnnotation
- Overrides:
hashCode
in classObject
-
setAccessible
-
invoke
-