Class Symbols.UnknownSymbol
java.lang.Object
org.sonar.java.model.Symbols.DefaultSymbol
org.sonar.java.model.Symbols.UnknownSymbol
- All Implemented Interfaces:
Symbol
- Direct Known Subclasses:
Symbols.RootPackageSymbol
,Symbols.UnknownMethodSymbol
,Symbols.UnkownTypeSymbol
- Enclosing class:
Symbols
-
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_SYMBOL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeclaration node of this symbol.final Symbol.TypeSymbol
The closest enclosing class.boolean
name()
Name of this symbol.owner()
The owner of this symbol.final Type
type()
Type of symbol.final List
<IdentifierTree> usages()
The identifier trees that reference this symbol.Methods inherited from class org.sonar.java.model.Symbols.DefaultSymbol
isAbstract, isDeprecated, isEnum, isFinal, isInterface, isMethodSymbol, isPackageSymbol, isPackageVisibility, isPrivate, isProtected, isPublic, isStatic, isTypeSymbol, isVariableSymbol, isVolatile, metadata
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sonar.plugins.java.api.semantic.Symbol
isLocalVariable, isParameter
-
Constructor Details
-
UnknownSymbol
public UnknownSymbol()
-
-
Method Details
-
isUnknown
public boolean isUnknown() -
name
-
owner
-
type
-
enclosingClass
Description copied from interface:Symbol
The closest enclosing class.- Returns:
- null for package symbols, themselves for type symbol and enclosing class of methods or variables.
-
declaration
-
usages
Description copied from interface:Symbol
The identifier trees that reference this symbol.- Returns:
- a list of IdentifierTree referencing this symbol. An empty list if this symbol is unused.
-