Interface JMethodSymbol
-
- All Superinterfaces:
AnnotableSymbol
,JAccessibleElementSymbol
,JElementSymbol
,JExecutableSymbol
,JTypeParameterOwnerSymbol
public interface JMethodSymbol extends JExecutableSymbol
Reference to a method.- 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 <R,P>
RacceptVisitor(SymbolVisitor<R,P> visitor, P param)
Dispatch to the appropriate visit method of the visitor and returns its result.default @Nullable SymbolicValue
getDefaultAnnotationValue()
Returns the default value, if this is a constant method.default boolean
isAnnotationAttribute()
Return whether this method defines an attribute of the enclosing annotation type.boolean
isBridge()
default boolean
isStatic()
default @Nullable N
tryGetNode()
Returns the node that declares this symbol.-
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
getModifiers
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JElementSymbol
equals, getSimpleName, getTypeSystem, isUnresolved, nameEquals
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JExecutableSymbol
getAnnotatedReceiverType, getArity, getEnclosingClass, getFormalParameters, getFormalParameterTypes, getGenericSignature, getPackageName, getReturnType, getThrownExceptionTypes, hasReceiver, isDefaultMethod, isVarargs
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symbols.JTypeParameterOwnerSymbol
getEnclosingTypeParameterOwner, getLexicalScope, getTypeParameterCount, getTypeParameters, isGeneric
-
-
-
-
Method Detail
-
isBridge
boolean isBridge()
-
isStatic
default boolean isStatic()
- Specified by:
isStatic
in interfaceJAccessibleElementSymbol
-
getDefaultAnnotationValue
default @Nullable SymbolicValue getDefaultAnnotationValue()
Returns the default value, if this is a constant method. SeeSymbolicValue
for current limitations
-
isAnnotationAttribute
default boolean isAnnotationAttribute()
Return whether this method defines an attribute of the enclosing annotation type.
-
acceptVisitor
default <R,P> R acceptVisitor(SymbolVisitor<R,P> visitor, P param)
Description copied from interface:JElementSymbol
Dispatch to the appropriate visit method of the visitor and returns its result.- Specified by:
acceptVisitor
in interfaceJElementSymbol
-
tryGetNode
default @Nullable N tryGetNode()
Description copied from interface:JElementSymbol
Returns the node that declares this symbol. Eg forJMethodSymbol
, it's anASTMethodDeclaration
. Will only return non-null if the symbol is declared in the file currently being analysed.- Specified by:
tryGetNode
in interfaceJElementSymbol
-
-