Interface JTypeParameterOwnerSymbol

All Superinterfaces:
AnnotableSymbol, JAccessibleElementSymbol, JElementSymbol
All Known Subinterfaces:
JClassSymbol, JConstructorSymbol, JExecutableSymbol, JMethodSymbol

public interface JTypeParameterOwnerSymbol extends JAccessibleElementSymbol
Represents a declaration that can declare type parameters, i.e. JClassSymbol or JMethodSymbol.
Since:
7.0.0
  • Method Details

    • getTypeParameters

      List<JTypeVar> getTypeParameters()
      Returns an unmodifiable list of the type variables declared by this symbol.
    • getLexicalScope

      default LexicalScope getLexicalScope()
      Returns the lexical scope of this symbol. This is little more than a map of all the type parameters that are in scope at the point of this declaration, indexed by their name. For example, for a method, this includes the type parameters of the method, the type parameters of its enclosing class, and all the other enclosing classes.
    • getTypeParameterCount

      default int getTypeParameterCount()
    • isGeneric

      default boolean isGeneric()
    • getEnclosingTypeParameterOwner

      default @Nullable JTypeParameterOwnerSymbol getEnclosingTypeParameterOwner()
      Returns the enclosing method or the enclosing class, in that order of priority.