Class TypeMethodReference


public class TypeMethodReference extends MethodReference
Type method reference expression AST node type (added in JLS8 API).
 TypeMethodReference:
     Type ::
         [ < Type { , Type } > ]
         Identifier
 
Since:
3.10
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • TYPE_PROPERTY

      public static final ChildPropertyDescriptor TYPE_PROPERTY
      The "type" structural property of this node type (child type: Type).
    • 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)
    • getType

      public Type getType()
      Returns the type of this type method reference expression.
      Returns:
      the type node
    • setType

      public void setType(Type type)
      Sets the type of this type method reference expression.
      Parameters:
      type - the new type node
      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 type method reference expression.
      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