Interface TypeVariableSource

    • Field Detail

      • UNDEFINED

        static final TypeVariableSource UNDEFINED
        Indicates that a type variable source is undefined.
    • Method Detail

      • getTypeVariables

        TypeList.Generic getTypeVariables()
        Returns the type variables that are declared by this element.
        Returns:
        The type variables that are declared by this element.
      • getEnclosingSource

        TypeVariableSource getEnclosingSource()
        Returns the enclosing source of type variables that are valid in the scope of this type variable source.
        Returns:
        The enclosing source or null if no such source exists.
      • isInferrable

        boolean isInferrable()
        Returns true if type variables declared by this type variable source allow dynamic type inference.
        Returns:
        true if type variables declared by this type variable source allow dynamic type inference.
      • findVariable

        TypeDescription.Generic findVariable​(java.lang.String symbol)
        Finds a particular variable with the given name in the closes type variable source that is visible from this instance.
        Parameters:
        symbol - The symbolic name of the type variable.
        Returns:
        The type variable.
      • accept

        <T> T accept​(TypeVariableSource.Visitor<T> visitor)
        Applies a visitor on this type variable source.
        Type Parameters:
        T - The visitor's return type.
        Parameters:
        visitor - The visitor to apply.
        Returns:
        The visitor's return value.
      • isGenerified

        boolean isGenerified()
        Checks if this type variable source has a generic declaration. This means:
        • A type declares type variables or is an inner class of a type with a generic declaration.
        • A method declares at least one type variable.
        Returns:
        true if this type code element has a generic declaration.