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 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: 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.