Class Name

  • All Implemented Interfaces:
    IDocElement
    Direct Known Subclasses:
    QualifiedName, SimpleName

    public abstract class Name
    extends Expression
    implements IDocElement
    Abstract base class for all AST nodes that represent names. There are exactly two kinds of name: simple ones (SimpleName) and qualified ones (QualifiedName).

     Name:
         SimpleName
         QualifiedName
     

    Since:
    2.0
    Restriction:
    This class is not intended to be subclassed by clients.
    • Method Detail

      • isSimpleName

        public final boolean isSimpleName()
        Returns whether this name is a simple name (SimpleName).
        Returns:
        true if this is a simple name, and false otherwise
      • isQualifiedName

        public final boolean isQualifiedName()
        Returns whether this name is a qualified name (QualifiedName).
        Returns:
        true if this is a qualified name, and false otherwise
      • resolveBinding

        public final IBinding resolveBinding()
        Resolves and returns the binding for the entity referred to by this name.

        Note that bindings are generally unavailable unless requested when the AST is being built.

        Returns:
        the binding, or null if the binding cannot be resolved
      • getFullyQualifiedName

        public final String getFullyQualifiedName()
        Returns the standard dot-separated representation of this name. If the name is a simple name, the result is the name's identifier. If the name is a qualified name, the result is the name of the qualifier (as computed by this method) followed by "." followed by the name's identifier.
        Returns:
        the fully qualified name
        Since:
        3.0