Top Description Inners Fields Constructors Methods
org.jboss.jandex

public final Class ClassType

extends Type
Class Inheritance

Represents a class type. Class types also include erasures of parameterized types.

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.

Author
Jason T. Greene

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ClassType.Builder

Convenient builder for ClassType.

Field Summary

Modifier and TypeField and Description
public static final ClassType
Inherited from org.jboss.jandex.Type:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
ClassType(DotName name, AnnotationInstance[] annotations)

Method Summary

Modifier and TypeMethod and Description
public ClassType
asClassType()

Overrides org.jboss.jandex.Type.asClassType.

Casts this type to a org.jboss.jandex.ClassType and returns it if the kind is Kind#CLASS.
public static ClassType.Builder

Returns:

the builder
builder
(DotName
binary name of the class
name
)

Create a builder of a class type with the given name.

public static ClassType.Builder

Returns:

the builder
builder
(Class<?>
the class
clazz
)

Create a builder of a class type for the given class.

pack-priv Type
copyType(AnnotationInstance[] newAnnotations)

Implements abstract org.jboss.jandex.Type.copyType.

public static ClassType

Returns:

the class type
create
(DotName
the binary name of this class type
name
)

Create an instance of a class type with given name.

public static ClassType

Returns:

the class type
create
(String
the binary name of this class type
name
)

Create an instance of a class type with given name.

public static ClassType

Returns:

the class type
create
(Class<?>
the class
clazz
)

Create an instance of a class type for given clazz.

public Type.Kind
kind()

Implements abstract org.jboss.jandex.Type.kind.

Returns the kind of Type this is.
pack-priv ParameterizedType
Inherited from org.jboss.jandex.Type:
addAnnotationannotationannotationArrayannotationsannotationsWithRepeatableappendAnnotationsasArrayTypeasParameterizedTypeasPrimitiveTypeasTypeVariableasTypeVariableReferenceasUnresolvedTypeVariableasVoidTypeasWildcardTypecreatecreateWithAnnotationsdescriptorequalshasAnnotationhashCodeinternEqualsinternHashCodenametoStringtoString

Field Detail

OBJECT_TYPEback to summary
public static final ClassType OBJECT_TYPE

Constructor Detail

ClassTypeback to summary
pack-priv ClassType(DotName name)
ClassTypeback to summary
pack-priv ClassType(DotName name, AnnotationInstance[] annotations)

Method Detail

asClassTypeback to summary
public ClassType asClassType()

Overrides org.jboss.jandex.Type.asClassType.

Doc from org.jboss.jandex.Type.asClassType.

Casts this type to a org.jboss.jandex.ClassType and returns it if the kind is Kind#CLASS. Throws an exception otherwise.

Returns:ClassType

a ClassType

Annotations
@Override
builderback to summary
public static ClassType.Builder builder(DotName name)

Create a builder of a class type with the given name.

Parameters
name:DotName

binary name of the class

Returns:ClassType.Builder

the builder

Since
3.1.0
builderback to summary
public static ClassType.Builder builder(Class<?> clazz)

Create a builder of a class type for the given class.

Parameters
clazz:Class<?>

the class

Returns:ClassType.Builder

the builder

Since
3.1.0
copyTypeback to summary
pack-priv Type copyType(AnnotationInstance[] newAnnotations)

Implements abstract org.jboss.jandex.Type.copyType.

Annotations
@Override
createback to summary
public static ClassType create(DotName name)

Create an instance of a class type with given name.

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:DotName

the binary name of this class type

Returns:ClassType

the class type

Since
3.0.4
createback to summary
public static ClassType create(String name)

Create an instance of a class type with given name.

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:String

the binary name of this class type

Returns:ClassType

the class type

Since
3.1.0
createback to summary
public static ClassType create(Class<?> clazz)

Create an instance of a class type for given clazz.

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:Class<?>

the class

Returns:ClassType

the class type

Since
3.1.0
kindback to summary
public Type.Kind kind()

Implements abstract org.jboss.jandex.Type.kind.

Doc from org.jboss.jandex.Type.kind.

Returns the kind of Type this is.

Returns:Type.Kind

the kind

Annotations
@Override
toParameterizedTypeback to summary
pack-priv ParameterizedType toParameterizedType()
org.jboss.jandex back to summary

public final Class ClassType.Builder

extends Type.Builder<ClassType.Builder>
Class Inheritance

Convenient builder for ClassType.
Since
3.1.0

Field Summary

Inherited from org.jboss.jandex.Type.Builder:
annotationsname

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ClassType

Returns:

the built class type
build
()

Returns the built class type.

Inherited from org.jboss.jandex.Type.Builder:
addAnnotationannotationsArrayself

Constructor Detail

Builderback to summary
pack-priv Builder(DotName name)

Method Detail

buildback to summary
public ClassType build()

Returns the built class type.

Returns:ClassType

the built class type