Interface JTypeParameterOwnerSymbol
- All Superinterfaces:
AnnotableSymbol
,JAccessibleElementSymbol
,JElementSymbol
- All Known Subinterfaces:
JClassSymbol
,JConstructorSymbol
,JExecutableSymbol
,JMethodSymbol
Represents a declaration that can declare type parameters,
i.e.
JClassSymbol
or JMethodSymbol
.- Since:
- 7.0.0
-
Field Summary
Fields inherited from interface net.sourceforge.pmd.lang.java.symbols.JAccessibleElementSymbol
PRIMITIVE_PACKAGE
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable JTypeParameterOwnerSymbol
Returns theenclosing method
or theenclosing class
, in that order of priority.default LexicalScope
Returns the lexical scope of this symbol.default int
Returns an unmodifiable list of the type variables declared by this symbol.default boolean
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 Details
-
getTypeParameters
Returns an unmodifiable list of the type variables declared by this symbol. -
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
Returns theenclosing method
or theenclosing class
, in that order of priority.
-