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.
  • Field Details

    • name

      private final String name
  • Constructor Details

    • UnresolvedTypeVariable

      UnresolvedTypeVariable(String name)
    • UnresolvedTypeVariable

      UnresolvedTypeVariable(String name, AnnotationInstance[] annotations)
  • Method Details

    • identifier

      public 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
    • kind

      public Type.Kind kind()
      Description copied from class: Type
      Returns the kind of Type this is.
      Specified by:
      kind in class Type
      Returns:
      the kind
    • asUnresolvedTypeVariable

      public UnresolvedTypeVariable asUnresolvedTypeVariable()
      Description copied from class: Type
      Casts this type to an UnresolvedTypeVariable and returns it if the kind is Type.Kind.UNRESOLVED_TYPE_VARIABLE. Throws an exception otherwise.
      Overrides:
      asUnresolvedTypeVariable in class Type
      Returns:
      an UnresolvedTypeVariable
    • copyType

      Type copyType(AnnotationInstance[] newAnnotations)
      Specified by:
      copyType in class Type
    • toString

      String toString(boolean simple)
      Overrides:
      toString in class Type
    • equals

      public boolean equals(Object o)
      Description copied from class: Type
      Compares this Type 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.
      Overrides:
      equals in class Type
      Parameters:
      o - the type to compare to
      Returns:
      true if equal
      See Also:
    • hashCode

      public int hashCode()
      Description copied from class: Type
      Computes a hash code representing this type.
      Overrides:
      hashCode in class Type
      Returns:
      the hash code
    • internEquals

      boolean internEquals(Object o)
      Overrides:
      internEquals in class Type
    • internHashCode

      int internHashCode()
      Overrides:
      internHashCode in class Type