Interface Symbol.TypeSymbol
- All Superinterfaces:
Symbol
- Enclosing interface:
Symbol
Symbol for a type : class, enum, interface or annotation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sonar.plugins.java.api.semantic.Symbol
Symbol.LabelSymbol, Symbol.MethodSymbol, Symbol.TypeSymbol, Symbol.VariableSymbol -
Method Summary
Modifier and TypeMethodDescriptionDeclaration node of this symbol.Interfaces implemented by this type.booleanlookupSymbols(String name) Lookup symbols accessible from this type with the name passed in parameter.List of symbols defined by this type symbols.Returns the superclass of this type symbol.Methods 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, name, owner, type, usages
-
Method Details
-
superClass
Returns the superclass of this type symbol.- Returns:
- null for java.lang.Object, the superclass for every other type.
-
interfaces
Interfaces implemented by this type.- Returns:
- an empty list if this type does not implement any interface.
-
memberSymbols
Collection<Symbol> memberSymbols()List of symbols defined by this type symbols. This will not return any inherited symbol.- Returns:
- The collection of symbols defined by this type.
-
lookupSymbols
Lookup symbols accessible from this type with the name passed in parameter.- Parameters:
name- name of searched symbol.- Returns:
- A collection of symbol matching the looked up name.
-
declaration
Description copied from interface:SymbolDeclaration node of this symbol. Currently, only works for declaration within the same file.- Specified by:
declarationin interfaceSymbol- Returns:
- the Tree of the declaration of this symbol. Null if declaration does not occur in the currently analyzed file.
-
superTypes
- Returns:
- the set of types that are super types of this type (extended classes and implemented interfaces).
-
outermostClass
Symbol.TypeSymbol outermostClass()- Returns:
- the most outer class containing this symbol.
-
isAnnotation
boolean isAnnotation()- Returns:
- true if this type is an annotation.
-