Package org.jboss.jandex
Class UnresolvedTypeVariable
- java.lang.Object
-
- org.jboss.jandex.Type
-
- org.jboss.jandex.UnresolvedTypeVariable
-
public final class UnresolvedTypeVariable extends Type
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.- Author:
- Jason T. Greene
-
-
Field Summary
-
Fields inherited from class org.jboss.jandex.Type
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnresolvedTypeVariableasUnresolvedTypeVariable()Casts this type to anUnresolvedTypeVariableand returns it if the kind isType.Kind.UNRESOLVED_TYPE_VARIABLEThrows an exception otherwise.booleanequals(Object o)Compares this Type with another type, and returns true if they are equivalent.inthashCode()Computes a hash code representing this type.Stringidentifier()The identifier of this unresolved type variable as it appears in Java source code.Type.Kindkind()Returns the kind of Type this is.StringtoString()Returns a string representation for this type.-
Methods inherited from class org.jboss.jandex.Type
annotation, annotations, asArrayType, asClassType, asParameterizedType, asPrimitiveType, asTypeVariable, asVoidType, asWildcardType, create, hasAnnotation, name
-
-
-
-
Method Detail
-
identifier
public String 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
-
asUnresolvedTypeVariable
public UnresolvedTypeVariable asUnresolvedTypeVariable()
Description copied from class:TypeCasts this type to anUnresolvedTypeVariableand returns it if the kind isType.Kind.UNRESOLVED_TYPE_VARIABLEThrows an exception otherwise.- Overrides:
asUnresolvedTypeVariablein classType- Returns:
- a
ClassType
-
toString
public String toString()
Description copied from class:TypeReturns a string representation for this type. It is similar, yet not equivalent to a Java source code representation.
-
equals
public boolean equals(Object o)
Description copied from class:TypeCompares 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.- Overrides:
equalsin classType- Parameters:
o- the type to compare to- Returns:
- true if equal
- See Also:
Object.equals(Object)
-
-