Interface Symbol.TypeSymbol

All Superinterfaces:
Symbol
Enclosing interface:
Symbol

public static interface Symbol.TypeSymbol extends Symbol
Symbol for a type : class, enum, interface or annotation.
  • Method Details

    • 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: Symbol
      Declaration node of this symbol. Currently, only works for declaration within the same file.
      Specified by:
      declaration in interface Symbol
      Returns:
      the Tree of the declaration of this symbol. Null if declaration does not occur in the currently analyzed file.
    • superTypes

      Set<Type> 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.