Package org.jboss.jandex
Class UnresolvedTypeVariable
java.lang.Object
org.jboss.jandex.Type
org.jboss.jandex.UnresolvedTypeVariable
Represents a type variable that could not be resolved during indexing. This type will only occur
as a result of a bug, or a non-compliant Java class file. It is provided in order to prevent
failure.
-
Nested Class Summary
-
Field Summary
FieldsFields inherited from class org.jboss.jandex.Type
EMPTY_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionUnresolvedTypeVariable
(String name) UnresolvedTypeVariable
(String name, AnnotationInstance[] annotations) -
Method Summary
Modifier and TypeMethodDescriptionCasts this type to anUnresolvedTypeVariable
and returns it if the kind isType.Kind.UNRESOLVED_TYPE_VARIABLE
Throws an exception otherwise.(package private) Type
copyType
(AnnotationInstance[] newAnnotations) boolean
Compares this Type with another type, and returns true if they are equivalent.int
hashCode()
Computes a hash code representing this type.The identifier of this unresolved type variable as it appears in Java source code.kind()
Returns the kind of Type this is.toString()
Returns a string representation for this type.Methods inherited from class org.jboss.jandex.Type
addAnnotation, annotation, annotationArray, annotations, appendAnnotations, asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asVoidType, asWildcardType, create, hasAnnotation, name, toString
-
Field Details
-
name
-
hash
private int hash
-
-
Constructor Details
-
UnresolvedTypeVariable
UnresolvedTypeVariable(String name) -
UnresolvedTypeVariable
UnresolvedTypeVariable(String name, AnnotationInstance[] annotations)
-
-
Method Details
-
identifier
The identifier of this unresolved type variable as it appears in Java source code.The following class has a type parameter, with an identifier of "T":
class Foo<T extends Number> {}
- Returns:
- the identifier of this type variable
-
kind
Description copied from class:Type
Returns the kind of Type this is. -
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:
- a
ClassType
-
toString
Description copied from class:Type
Returns a string representation for this type. It is similar, yet not equivalent to a Java source code representation. -
copyType
-
equals
Description copied from class:Type
Compares this Type with another type, and returns true if they are equivalent. A type is equivalent to another type if it is the same kind, and all of its 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.
-