Class SuperFieldAccess


  • public class SuperFieldAccess
    extends Expression
    Simple or qualified "super" field access expression AST node type.
     SuperFieldAccess:
         [ ClassName . ] super . Identifier
     

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

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

      • QUALIFIER_PROPERTY

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

      • 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 of this "super" field access expression, or null if there is none.
        Returns:
        the qualifier name node, or null if there is none
      • setQualifier

        public void setQualifier​(Name name)
        Sets or clears the qualifier of this "super" field access expression.
        Parameters:
        name - the qualifier name node, or null if there is none
        Throws:
        IllegalArgumentException - if:
        • the node belongs to a different AST
        • the node already has a parent
      • getName

        public SimpleName getName()
        Returns the name of the field accessed in this "super" field access expression.
        Returns:
        the field name
      • resolveFieldBinding

        public IVariableBinding resolveFieldBinding()
        Resolves and returns the binding for the field accessed by this expression.

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

        Returns:
        the variable binding, or null if the binding cannot be resolved
        Since:
        3.0
      • setName

        public void setName​(SimpleName fieldName)
        Sets the name of the field accessed in this "super" field access expression.
        Parameters:
        fieldName - the field name
        Throws:
        IllegalArgumentException - if:
        • the node belongs to a different AST
        • the node already has a parent