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
orJMethodSymbol
.- Since:
- 7.0.0
-
-
Field Summary
-
Fields inherited from interface net.sourceforge.pmd.lang.java.symbols.JAccessibleElementSymbol
PRIMITIVE_PACKAGE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable JTypeParameterOwnerSymbol
getEnclosingTypeParameterOwner()
Returns theenclosing method
or theenclosing class
, in that order of priority.default LexicalScope
getLexicalScope()
Returns the lexical scope of this symbol.default int
getTypeParameterCount()
List<JTypeVar>
getTypeParameters()
Returns an unmodifiable list of the type variables declared by this symbol.default boolean
isGeneric()
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.AnnotableSymbol
getDeclaredAnnotation, getDeclaredAnnotations, isAnnotationPresent
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JAccessibleElementSymbol
getEnclosingClass, getModifiers, getPackageName, isStatic
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JElementSymbol
acceptVisitor, equals, getSimpleName, getTypeSystem, isUnresolved, nameEquals, tryGetNode
-
-
-
-
Method Detail
-
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 theenclosing method
or theenclosing class
, in that order of priority.
-
-