Class SuperMethodReference


public class SuperMethodReference extends MethodReference
Super method reference AST node type (added in JLS8 API).
 SuperMethodReference:
     [ ClassName . ] super ::
         [ < Type { , Type } > ]
         Identifier
 
Since:
3.10
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).
    • TYPE_ARGUMENTS_PROPERTY

      public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY
      The "typeArguments" structural property of this node type (element type: Type).
    • NAME_PROPERTY

      public static final ChildPropertyDescriptor NAME_PROPERTY
      The "name" structural property of this node type (child type: SimpleName).
  • 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)
    • getQualifier

      public Name getQualifier()
      Returns the qualifier of this "super" method reference, or null if there is none.
      Returns:
      the qualifier name node, or null if there is none
    • setQualifier

      public void setQualifier(Name name)
      Sets the qualifier of this "super" method reference 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
    • typeArguments

      public List typeArguments()
      Returns the live ordered list of type arguments of this super method reference.
      Overrides:
      typeArguments in class MethodReference
      Returns:
      the live list of type arguments (element type: Type)
    • getName

      public SimpleName getName()
      Returns the name of the method referenced in this expression.
      Returns:
      the method name node
    • setName

      public void setName(SimpleName name)
      Sets the name of the method referenced in this expression to the given name.
      Parameters:
      name - the new method name
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent