Interface Symbol.TypeSymbol
-
- All Superinterfaces:
Symbol
- All Known Implementing Classes:
JavaSymbol.TypeJavaSymbol,JavaSymbol.TypeVariableJavaSymbol,JavaSymbol.WildcardSymbol
- Enclosing interface:
- Symbol
public static interface Symbol.TypeSymbol extends 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassTreedeclaration()Declaration node of this symbol.List<Type>interfaces()Interfaces implemented by this type.Collection<Symbol>lookupSymbols(String name)Lookup symbols accessible from this type with the name passed in parameter.Collection<Symbol>memberSymbols()List of symbols defined by this type symbols.TypesuperClass()Returns the superclass of this type symbol.-
Methods inherited from interface org.sonar.plugins.java.api.semantic.Symbol
enclosingClass, isAbstract, isDeprecated, isEnum, isFinal, isInterface, isMethodSymbol, isPackageSymbol, isPackageVisibility, isPrivate, isProtected, isPublic, isStatic, isTypeSymbol, isUnknown, isVariableSymbol, isVolatile, metadata, name, owner, type, usages
-
-
-
-
Method Detail
-
superClass
@CheckForNull Type superClass()
Returns the superclass of this type symbol.- Returns:
- null for java.lang.Object, the superclass for every other type.
-
interfaces
List<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
Collection<Symbol> lookupSymbols(String name)
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
@Nullable ClassTree 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.
-
-