Package net.bytebuddy.description.type
Enum Class TypeDefinition.Sort
- All Implemented Interfaces:
Serializable
,Comparable<TypeDefinition.Sort>
,Constable
- Enclosing interface:
TypeDefinition
Represents a
TypeDescription.Generic
's form.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
A proxy for interacting withjava.lang.reflect.AnnotatedType
.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a generic array type.Represents a non-generic type.Represents a parameterized type.Represents a type variable that is attached to aTypeVariableSource
.Represents a type variable that is merely symbolic and is not attached to aTypeVariableSource
and does not defined bounds.Represents a wildcard type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TypeDefinition.Sort.AnnotatedType
A dispatcher for interacting withjava.lang.reflect.AnnotatedType
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeDescription.Generic
Describes a loaded generic type as aTypeDescription.Generic
.protected static TypeDescription.Generic
describe
(Type type, TypeDescription.Generic.AnnotationReader annotationReader) Describes the generic type while using the supplied annotation reader for resolving type annotations if this language feature is available on the current JVM.static TypeDescription.Generic
describeAnnotated
(AnnotatedElement annotatedType) Describes a loadedjava.lang.reflect.AnnotatedType
as aTypeDescription.Generic
.private static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.boolean
Checks if this type sort represents a generic array.boolean
Checks if this type sort represents a non-generic type.boolean
Checks if this type sort represents a parameterized type.boolean
Checks if this type sort represents a type variable of any form.boolean
Checks if this type sort represents a wildcard.static TypeDefinition.Sort
Returns the enum constant of this class with the specified name.static TypeDefinition.Sort[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NON_GENERIC
Represents a non-generic type. -
GENERIC_ARRAY
Represents a generic array type. -
PARAMETERIZED
Represents a parameterized type. -
WILDCARD
Represents a wildcard type. -
VARIABLE
Represents a type variable that is attached to aTypeVariableSource
. -
VARIABLE_SYMBOLIC
Represents a type variable that is merely symbolic and is not attached to aTypeVariableSource
and does not defined bounds.
-
-
Field Details
-
ANNOTATED_TYPE
A dispatcher for interacting withjava.lang.reflect.AnnotatedType
.
-
-
Constructor Details
-
Sort
private Sort()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
describe
Describes a loaded generic type as aTypeDescription.Generic
.- Parameters:
type
- The type to describe.- Returns:
- A description of the provided generic type.
-
describeAnnotated
Describes a loadedjava.lang.reflect.AnnotatedType
as aTypeDescription.Generic
.- Parameters:
annotatedType
- Thejava.lang.reflect.AnnotatedType
to describe.- Returns:
- A description of the provided generic type.
-
describe
protected static TypeDescription.Generic describe(Type type, TypeDescription.Generic.AnnotationReader annotationReader) Describes the generic type while using the supplied annotation reader for resolving type annotations if this language feature is available on the current JVM.- Parameters:
type
- The type to describe.annotationReader
- The annotation reader for extracting type annotations.- Returns:
- A description of the provided generic annotated type.
-
isNonGeneric
public boolean isNonGeneric()Checks if this type sort represents a non-generic type.- Returns:
true
if this sort form represents a non-generic.
-
isParameterized
public boolean isParameterized()Checks if this type sort represents a parameterized type.- Returns:
true
if this sort form represents a parameterized type.
-
isGenericArray
public boolean isGenericArray()Checks if this type sort represents a generic array.- Returns:
true
if this type sort represents a generic array.
-
isWildcard
public boolean isWildcard()Checks if this type sort represents a wildcard.- Returns:
true
if this type sort represents a wildcard.
-
isTypeVariable
public boolean isTypeVariable()Checks if this type sort represents a type variable of any form.- Returns:
true
if this type sort represents an attached type variable.
-