Class TypeVariableSignature

    • Field Detail

      • scanResult

        protected transient ScanResult scanResult
    • Constructor Detail

      • TypeVariableSignature

        public TypeVariableSignature​(String typeVariableName)
        Parameters:
        typeVariableName - The type variable name.
    • Method Detail

      • getTypeVariableName

        public String getTypeVariableName()
        Get the name of the type variable.
        Returns:
        The type variable name.
      • getCorrespondingTypeParameter

        public TypeParameter getCorrespondingTypeParameter()
        Look up a type variable (e.g. "T") in the defining method and/or enclosing class' type parameters, and returns the type parameter with the same name (e.g. "T extends com.xyz.Cls").
        Returns:
        the type parameter (e.g. "T extends com.xyz.Cls", or simply "T" if the type parameter does not have any bounds). Returns null if a type parameter with the same name as the type variable could not be found (this should not in general happen, since type variables in successfully-compiled code should be able to be linked to the corresponding type parameter).
      • getClassNamesFromTypeDescriptors

        public void getClassNamesFromTypeDescriptors​(Set<String> classNames)
      • getClassName

        protected String getClassName()
        Return containingClassName, so that getClassInfo() returns the ClassInfo object for the containing class.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toStringWithTypeBound

        public String toStringWithTypeBound()
        Returns the type variable along with its type bound, if available (e.g. "X extends xyz.Cls"). You can get this in structured from by calling getCorrespondingTypeParameter(). Returns just the type variable if there is no type bound, or if no type bound is known (i.e. if getCorrespondingTypeParameter() returns null).
        Returns:
        The string representation.