Class JavaSymbol

    • Method Detail

      • flags

        public int flags()
        See Also:
        Flags
      • owner

        public JavaSymbol owner()
        Description copied from interface: Symbol
        The owner of this symbol.
        Specified by:
        owner in interface Symbol
        Returns:
        the symbol that owns this symbol.
      • getName

        public String getName()
      • metadata

        public SymbolMetadataResolve metadata()
        Description copied from interface: Symbol
        Symbol metadata informations, annotations for instance.
        Specified by:
        metadata in interface Symbol
        Returns:
        the metadata of this symbol.
      • complete

        public void complete()
      • enclosingClass

        public JavaSymbol.TypeJavaSymbol enclosingClass()
        The closest enclosing class.
        Specified by:
        enclosingClass in interface Symbol
        Returns:
        null for package symbols, themselves for type symbol and enclosing class of methods or variables.
      • type

        public Type type()
        Description copied from interface: Symbol
        Type of symbol.
        Specified by:
        type in interface Symbol
        Returns:
        the type of this symbol.
      • isTypeSymbol

        public boolean isTypeSymbol()
        Specified by:
        isTypeSymbol in interface Symbol
      • isMethodSymbol

        public boolean isMethodSymbol()
        Specified by:
        isMethodSymbol in interface Symbol
      • isStatic

        public boolean isStatic()
        Specified by:
        isStatic in interface Symbol
      • isFinal

        public boolean isFinal()
        Specified by:
        isFinal in interface Symbol
      • isEnum

        public boolean isEnum()
        Specified by:
        isEnum in interface Symbol
      • isInterface

        public boolean isInterface()
        Specified by:
        isInterface in interface Symbol
      • isAnnotation

        public boolean isAnnotation()
      • isAbstract

        public boolean isAbstract()
        Specified by:
        isAbstract in interface Symbol
      • isPublic

        public boolean isPublic()
        Specified by:
        isPublic in interface Symbol
      • isPrivate

        public boolean isPrivate()
        Specified by:
        isPrivate in interface Symbol
      • isProtected

        public boolean isProtected()
        Specified by:
        isProtected in interface Symbol
      • isDeprecated

        public boolean isDeprecated()
        Specified by:
        isDeprecated in interface Symbol
      • isVolatile

        public boolean isVolatile()
        Specified by:
        isVolatile in interface Symbol
      • isDefault

        public boolean isDefault()
      • isUnknown

        public boolean isUnknown()
        Specified by:
        isUnknown in interface Symbol
      • name

        public String name()
        Description copied from interface: Symbol
        Name of this symbol.
        Specified by:
        name in interface Symbol
        Returns:
        simple name of the symbol.
      • isFlag

        protected boolean isFlag​(int flag)
      • usages

        public List<IdentifierTree> usages()
        Description copied from interface: Symbol
        The identifier trees that reference this symbol.
        Specified by:
        usages in interface Symbol
        Returns:
        a list of IdentifierTree referencing this symbol. An empty list if this symbol is unused.
      • declaration

        @Nullable
        public Tree 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.
      • callbackOnceComplete

        public void callbackOnceComplete​(Runnable callback)