Class Symbols.UnknownMethodSymbol
java.lang.Object
org.sonar.java.model.Symbols.DefaultSymbol
org.sonar.java.model.Symbols.UnknownSymbol
org.sonar.java.model.Symbols.UnknownMethodSymbol
- All Implemented Interfaces:
Symbol,Symbol.MethodSymbol
- Enclosing class:
Symbols
public static final class Symbols.UnknownMethodSymbol
extends Symbols.UnknownSymbol
implements Symbol.MethodSymbol
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sonar.plugins.java.api.semantic.Symbol
Symbol.LabelSymbol, Symbol.MethodSymbol, Symbol.TypeSymbol, Symbol.VariableSymbol -
Field Summary
Fields inherited from interface org.sonar.plugins.java.api.semantic.Symbol
ROOT_PACKAGE, UNKNOWN_SYMBOLFields inherited from interface org.sonar.plugins.java.api.semantic.Symbol.MethodSymbol
UNKNOWN_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeclaration node of this symbol.Symbols of parameters declared by this method.booleanbooleanbooleanbooleanbooleanbooleanname()Name of this symbol.Retrieve the overridden symbols in all the known type hierarchy.owner()The owner of this symbol.Type of parameters declared by this method.Compute the signature as identified from bytecode point of view.List of the exceptions that can be thrown by the method.Methods inherited from class org.sonar.java.model.Symbols.UnknownSymbol
enclosingClass, isUnknown, type, usagesMethods inherited from class org.sonar.java.model.Symbols.DefaultSymbol
isAbstract, isDeprecated, isEnum, isFinal, isInterface, isMethodSymbol, isPackageSymbol, isPackageVisibility, isPrivate, isProtected, isPublic, isStatic, isTypeSymbol, isVariableSymbol, isVolatile, metadataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sonar.plugins.java.api.semantic.Symbol
enclosingClass, isAbstract, isDeprecated, isEnum, isFinal, isInterface, isLocalVariable, isMethodSymbol, isPackageSymbol, isPackageVisibility, isParameter, isPrivate, isProtected, isPublic, isStatic, isTypeSymbol, isUnknown, isVariableSymbol, isVolatile, metadata, type, usages
-
Constructor Details
-
UnknownMethodSymbol
public UnknownMethodSymbol()
-
-
Method Details
-
declaration
Description copied from interface:SymbolDeclaration node of this symbol. Currently, only works for declaration within the same file.- Specified by:
declarationin interfaceSymbol- Specified by:
declarationin interfaceSymbol.MethodSymbol- Overrides:
declarationin classSymbols.UnknownSymbol- Returns:
- the Tree of the declaration of this symbol. Null if declaration does not occur in the currently analyzed file.
-
parameterTypes
Description copied from interface:Symbol.MethodSymbolType of parameters declared by this method. In case of generic types of method invocations, this list of types is more specialized than declarationParameters().stream().map(Symbol::type). For example it could be String instead of T.- Specified by:
parameterTypesin interfaceSymbol.MethodSymbol- Returns:
- empty list if method has a zero arity.
-
declarationParameters
Description copied from interface:Symbol.MethodSymbolSymbols of parameters declared by this method. Use to access parameter annotations. Note: 1) in case of generic types of method invocations, this list of types is less specialized thanSymbol.MethodSymbol.parameterTypes(). For example it could be T instead of String. 2) when the declaration comes from binaries, the name of the symbol will be generated (@see JVariableSymbol.ParameterPlaceholderSymbol).- Specified by:
declarationParametersin interfaceSymbol.MethodSymbol- Returns:
- empty list if methods has not parameters
-
returnType
- Specified by:
returnTypein interfaceSymbol.MethodSymbol
-
thrownTypes
Description copied from interface:Symbol.MethodSymbolList of the exceptions that can be thrown by the method.- Specified by:
thrownTypesin interfaceSymbol.MethodSymbol- Returns:
- empty list if no exception are declared in the throw clause of the method.
-
overriddenSymbols
Description copied from interface:Symbol.MethodSymbolRetrieve the overridden symbols in all the known type hierarchy. Note that it will only returns the symbols which might be determined from known types. The list might therefore not be complete in case of missing dependencies.- Specified by:
overriddenSymbolsin interfaceSymbol.MethodSymbol- Returns:
- the overridden symbols, or an empty list if the method is not overriding any method or overriding can not be determined (incomplete semantics)
-
owner
-
name
-
signature
Description copied from interface:Symbol.MethodSymbolCompute the signature as identified from bytecode point of view. Will be unique for each method.- Specified by:
signaturein interfaceSymbol.MethodSymbol- Returns:
- the signature of the method, as String
-
isOverridable
public boolean isOverridable()- Specified by:
isOverridablein interfaceSymbol.MethodSymbol- Returns:
- true if the method symbol is overridable.
-
isParametrizedMethod
public boolean isParametrizedMethod()- Specified by:
isParametrizedMethodin interfaceSymbol.MethodSymbol- Returns:
- true if the method has type parameters.
-
isDefaultMethod
public boolean isDefaultMethod()- Specified by:
isDefaultMethodin interfaceSymbol.MethodSymbol- Returns:
- true if the method has a default implementation.
-
isSynchronizedMethod
public boolean isSynchronizedMethod()- Specified by:
isSynchronizedMethodin interfaceSymbol.MethodSymbol- Returns:
- true if the method is synchronized.
-
isVarArgsMethod
public boolean isVarArgsMethod()- Specified by:
isVarArgsMethodin interfaceSymbol.MethodSymbol- Returns:
- true if the method takes a vararg argument (e.g. `String... args`).
-
isNativeMethod
public boolean isNativeMethod()- Specified by:
isNativeMethodin interfaceSymbol.MethodSymbol- Returns:
- true if the method is native.
-