Class QualifiedName

All Implemented Interfaces:
IDocElement

public class QualifiedName extends Name
AST node for a qualified name. A qualified name is defined recursively as a simple name preceded by a name, which qualifies it. Expressing it this way means that the qualifier and the simple name get their own AST nodes.
 QualifiedName:
    Name . SimpleName
 

See FieldAccess for guidelines on handling other expressions that resemble qualified names.

Since:
2.0
See Also:
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • QUALIFIER_PROPERTY

      public static final ChildPropertyDescriptor QUALIFIER_PROPERTY
      The "qualifier" structural property of this node type (child type: Name).
      Since:
      3.0
    • NAME_PROPERTY

      public static final ChildPropertyDescriptor NAME_PROPERTY
      The "name" structural property of this node type (child type: SimpleName).
      Since:
      3.0
  • Method Details

    • propertyDescriptors

      public static List propertyDescriptors(int apiLevel)
      Returns a list of structural property descriptors for this node type. Clients must not modify the result.
      Parameters:
      apiLevel - the API level; one of the AST.JLS* constants
      Returns:
      a list of property descriptors (element type: StructuralPropertyDescriptor)
      Since:
      3.0
    • getQualifier

      public Name getQualifier()
      Returns the qualifier part of this qualified name.
      Returns:
      the qualifier part of this qualified name
    • setQualifier

      public void setQualifier(Name qualifier)
      Sets the qualifier of this qualified name to the given name.
      Parameters:
      qualifier - the qualifier of this qualified name
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created
    • getName

      public SimpleName getName()
      Returns the name part of this qualified name.
      Returns:
      the name being qualified
    • setName

      public void setName(SimpleName name)
      Sets the name part of this qualified name to the given simple name.
      Parameters:
      name - the identifier of this qualified name
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent