Class ClassType
- All Implemented Interfaces:
Descriptor
Note that an inner class type enclosed in a parameterized type or in a type
annotated with a type annotation is represented as ParameterizedType
,
where the enclosing type is represented as the parameterized type's owner.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClassType
static final ClassType
static final ClassType
static final ClassType
static final ClassType
static final ClassType
static final ClassType
static final ClassType
static final ClassType
Fields inherited from class org.jboss.jandex.Type
EMPTY_ARRAY
Fields inherited from interface org.jboss.jandex.Descriptor
NO_SUBSTITUTION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCasts this type to aClassType
and returns it if the kind isType.Kind.CLASS
.static ClassType.Builder
Create a builder of a class type for the given class.static ClassType.Builder
Create a builder of a class type with the givenname
.(package private) Type
copyType
(AnnotationInstance[] newAnnotations) static ClassType
Create an instance of a class type for givenclazz
.static ClassType
Create an instance of a class type with givenname
.static ClassType
Create an instance of a class type with givenname
.kind()
Returns the kind of Type this is.(package private) ParameterizedType
Methods inherited from class org.jboss.jandex.Type
addAnnotation, annotation, annotationArray, annotations, annotationsWithRepeatable, appendAnnotations, asArrayType, asParameterizedType, asPrimitiveType, asTypeVariable, asTypeVariableReference, asUnresolvedTypeVariable, asVoidType, asWildcardType, create, createWithAnnotations, descriptor, equals, hasAnnotation, hashCode, internEquals, internHashCode, name, parse, toString, toString, withoutAnnotations
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jboss.jandex.Descriptor
descriptor
-
Field Details
-
OBJECT_TYPE
-
BYTE_CLASS
-
CHARACTER_CLASS
-
DOUBLE_CLASS
-
FLOAT_CLASS
-
INTEGER_CLASS
-
LONG_CLASS
-
SHORT_CLASS
-
BOOLEAN_CLASS
-
-
Constructor Details
-
ClassType
ClassType(DotName name) -
ClassType
ClassType(DotName name, AnnotationInstance[] annotations)
-
-
Method Details
-
create
Create an instance of a class type with givenname
.Note that an inner class type enclosed in a parameterized type or in a type annotated with a type annotation is represented as
ParameterizedType
, where the enclosing type is represented as the parameterized type's owner.- Parameters:
name
- the binary name of this class type- Returns:
- the class type
- Since:
- 3.0.4
-
create
Create an instance of a class type with givenname
.Note that an inner class type enclosed in a parameterized type or in a type annotated with a type annotation is represented as
ParameterizedType
, where the enclosing type is represented as the parameterized type's owner.- Parameters:
name
- the binary name of this class type- Returns:
- the class type
- Since:
- 3.1.0
-
create
Create an instance of a class type for givenclazz
.Note that an inner class type enclosed in a parameterized type or in a type annotated with a type annotation is represented as
ParameterizedType
, where the enclosing type is represented as the parameterized type's owner.- Parameters:
clazz
- the class- Returns:
- the class type
- Since:
- 3.1.0
-
builder
Create a builder of a class type with the givenname
.- Parameters:
name
- binary name of the class- Returns:
- the builder
- Since:
- 3.1.0
-
builder
Create a builder of a class type for the given class.- Parameters:
clazz
- the class- Returns:
- the builder
- Since:
- 3.1.0
-
kind
Description copied from class:Type
Returns the kind of Type this is. -
asClassType
Description copied from class:Type
Casts this type to aClassType
and returns it if the kind isType.Kind.CLASS
. Throws an exception otherwise.- Overrides:
asClassType
in classType
- Returns:
- a
ClassType
-
copyType
-
toParameterizedType
ParameterizedType toParameterizedType()
-