Package net.bytebuddy.description.type
Enum TypeDescription.Generic.AnnotationReader.NoOp
- java.lang.Object
-
- java.lang.Enum<TypeDescription.Generic.AnnotationReader.NoOp>
-
- net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader.NoOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TypeDescription.Generic.AnnotationReader.NoOp>
,java.lang.reflect.AnnotatedElement
,TypeDescription.Generic.AnnotationReader
- Enclosing interface:
- TypeDescription.Generic.AnnotationReader
public static enum TypeDescription.Generic.AnnotationReader.NoOp extends java.lang.Enum<TypeDescription.Generic.AnnotationReader.NoOp> implements TypeDescription.Generic.AnnotationReader, java.lang.reflect.AnnotatedElement
A non-operational annotation reader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader
TypeDescription.Generic.AnnotationReader.Delegator, TypeDescription.Generic.AnnotationReader.Dispatcher, TypeDescription.Generic.AnnotationReader.ForComponentType, TypeDescription.Generic.AnnotationReader.ForOwnerType, TypeDescription.Generic.AnnotationReader.ForTypeArgument, TypeDescription.Generic.AnnotationReader.ForTypeVariableBoundType, TypeDescription.Generic.AnnotationReader.ForWildcardLowerBoundType, TypeDescription.Generic.AnnotationReader.ForWildcardUpperBoundType, TypeDescription.Generic.AnnotationReader.NoOp
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.description.type.TypeDescription.Generic.AnnotationReader
DISPATCHER
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationList
asList()
Returns the underlying type annotations as a list.<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)
java.lang.annotation.Annotation[]
getAnnotations()
java.lang.annotation.Annotation[]
getDeclaredAnnotations()
boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
TypeDescription.Generic.AnnotationReader
ofComponentType()
Returns a reader for type annotations of an array's component type.TypeDescription.Generic.AnnotationReader
ofOuterClass()
Returns a reader for type annotations of an inner class type's outer type.TypeDescription.Generic.AnnotationReader
ofOwnerType()
Returns a reader for type annotations of a parameterized type's owner type.TypeDescription.Generic.AnnotationReader
ofTypeArgument(int index)
Returns a reader for type annotations of a parameterized type's type argument.TypeDescription.Generic.AnnotationReader
ofTypeVariableBoundType(int index)
Returns a reader for type annotations of a type variable's bound.TypeDescription.Generic.AnnotationReader
ofWildcardLowerBoundType(int index)
Returns a reader for type annotations of an represented element's wildcard lower bound.TypeDescription.Generic.AnnotationReader
ofWildcardUpperBoundType(int index)
Returns a reader for type annotations of an represented element's wildcard upper bound.java.lang.reflect.AnnotatedElement
resolve()
Resolves the underlyingAnnotatedElement
.static TypeDescription.Generic.AnnotationReader.NoOp
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TypeDescription.Generic.AnnotationReader.NoOp[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final TypeDescription.Generic.AnnotationReader.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static TypeDescription.Generic.AnnotationReader.NoOp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TypeDescription.Generic.AnnotationReader.NoOp c : TypeDescription.Generic.AnnotationReader.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeDescription.Generic.AnnotationReader.NoOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
resolve
public java.lang.reflect.AnnotatedElement resolve()
Resolves the underlyingAnnotatedElement
.- Specified by:
resolve
in interfaceTypeDescription.Generic.AnnotationReader
- Returns:
- The underlying annotated element.
-
asList
public AnnotationList asList()
Returns the underlying type annotations as a list.- Specified by:
asList
in interfaceTypeDescription.Generic.AnnotationReader
- Returns:
- The underlying type annotations as a list.
-
ofWildcardUpperBoundType
public TypeDescription.Generic.AnnotationReader ofWildcardUpperBoundType(int index)
Returns a reader for type annotations of an represented element's wildcard upper bound.- Specified by:
ofWildcardUpperBoundType
in interfaceTypeDescription.Generic.AnnotationReader
- Parameters:
index
- The wildcard bound's index.- Returns:
- An annotation reader for the underlying annotated upper bound.
-
ofWildcardLowerBoundType
public TypeDescription.Generic.AnnotationReader ofWildcardLowerBoundType(int index)
Returns a reader for type annotations of an represented element's wildcard lower bound.- Specified by:
ofWildcardLowerBoundType
in interfaceTypeDescription.Generic.AnnotationReader
- Parameters:
index
- The wildcard bound's index.- Returns:
- An annotation reader for the underlying annotated lower bound.
-
ofTypeVariableBoundType
public TypeDescription.Generic.AnnotationReader ofTypeVariableBoundType(int index)
Returns a reader for type annotations of a type variable's bound.- Specified by:
ofTypeVariableBoundType
in interfaceTypeDescription.Generic.AnnotationReader
- Parameters:
index
- The bound's index.- Returns:
- An annotation reader for the underlying annotated bound.
-
ofTypeArgument
public TypeDescription.Generic.AnnotationReader ofTypeArgument(int index)
Returns a reader for type annotations of a parameterized type's type argument.- Specified by:
ofTypeArgument
in interfaceTypeDescription.Generic.AnnotationReader
- Parameters:
index
- The bound's index.- Returns:
- An annotation reader for the underlying annotated bound..
-
ofOwnerType
public TypeDescription.Generic.AnnotationReader ofOwnerType()
Returns a reader for type annotations of a parameterized type's owner type.
Important: This feature is not currently implemented by the Java reflection API.
- Specified by:
ofOwnerType
in interfaceTypeDescription.Generic.AnnotationReader
- Returns:
- An annotation reader for the underlying owner type.
-
ofOuterClass
public TypeDescription.Generic.AnnotationReader ofOuterClass()
Returns a reader for type annotations of an inner class type's outer type.
Important: This feature is not currently implemented by the Java reflection API.
- Specified by:
ofOuterClass
in interfaceTypeDescription.Generic.AnnotationReader
- Returns:
- An annotation reader for the underlying owner type.
-
ofComponentType
public TypeDescription.Generic.AnnotationReader ofComponentType()
Returns a reader for type annotations of an array's component type.- Specified by:
ofComponentType
in interfaceTypeDescription.Generic.AnnotationReader
- Returns:
- An annotation reader for the underlying component type.
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresent
in interfacejava.lang.reflect.AnnotatedElement
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotation
in interfacejava.lang.reflect.AnnotatedElement
-
getAnnotations
public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfacejava.lang.reflect.AnnotatedElement
-
getDeclaredAnnotations
public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfacejava.lang.reflect.AnnotatedElement
-
-