Package org.jboss.jandex
Class UnresolvedTypeVariable
- java.lang.Object
-
- org.jboss.jandex.Type
-
- org.jboss.jandex.UnresolvedTypeVariable
-
- All Implemented Interfaces:
Descriptor
public final class UnresolvedTypeVariable extends Type
Represents a type variable that could not be resolved during indexing. This type may occur when indexing an incomplete classpath, or as a result of a bug, or a non-compliant Java class file. It is provided in order to prevent failure.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.jandex.Type
Type.Builder<THIS extends Type.Builder<THIS>>, Type.Kind
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
-
Fields inherited from class org.jboss.jandex.Type
EMPTY_ARRAY
-
Fields inherited from interface org.jboss.jandex.Descriptor
NO_SUBSTITUTION
-
-
Constructor Summary
Constructors Constructor Description UnresolvedTypeVariable(java.lang.String name)
UnresolvedTypeVariable(java.lang.String name, AnnotationInstance[] annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnresolvedTypeVariable
asUnresolvedTypeVariable()
Casts this type to anUnresolvedTypeVariable
and returns it if the kind isType.Kind.UNRESOLVED_TYPE_VARIABLE
.(package private) Type
copyType(AnnotationInstance[] newAnnotations)
boolean
equals(java.lang.Object o)
Compares thisType
with another type.int
hashCode()
Computes a hash code representing this type.java.lang.String
identifier()
Returns the identifier of this unresolved type variable as it appears in Java source code.(package private) boolean
internEquals(java.lang.Object o)
(package private) int
internHashCode()
Type.Kind
kind()
Returns the kind of Type this is.(package private) java.lang.String
toString(boolean simple)
-
Methods inherited from class org.jboss.jandex.Type
addAnnotation, annotation, annotationArray, annotations, annotationsWithRepeatable, appendAnnotations, asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asTypeVariableReference, asVoidType, asWildcardType, create, create, createWithAnnotations, descriptor, hasAnnotation, name, parse, 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
-
-
-
-
Constructor Detail
-
UnresolvedTypeVariable
UnresolvedTypeVariable(java.lang.String name)
-
UnresolvedTypeVariable
UnresolvedTypeVariable(java.lang.String name, AnnotationInstance[] annotations)
-
-
Method Detail
-
identifier
public java.lang.String identifier()
Returns the identifier of this unresolved type variable as it appears in Java source code.For example, the following class has a type parameter with an identifier of
T
:class Foo<T extends Number> { }
- Returns:
- the identifier of this type variable
-
asUnresolvedTypeVariable
public UnresolvedTypeVariable asUnresolvedTypeVariable()
Description copied from class:Type
Casts this type to anUnresolvedTypeVariable
and returns it if the kind isType.Kind.UNRESOLVED_TYPE_VARIABLE
. Throws an exception otherwise.- Overrides:
asUnresolvedTypeVariable
in classType
- Returns:
- an
UnresolvedTypeVariable
-
copyType
Type copyType(AnnotationInstance[] newAnnotations)
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:Type
Compares thisType
with another type. A type is equal to another type if it is of the same kind, and all of their fields are equal. This includes annotations, which must be equal as well.
-
hashCode
public int hashCode()
Description copied from class:Type
Computes a hash code representing this type.
-
internEquals
boolean internEquals(java.lang.Object o)
- Overrides:
internEquals
in classType
-
internHashCode
int internHashCode()
- Overrides:
internHashCode
in classType
-
-