Class UsesDirective


public class UsesDirective extends ModuleDirective
Uses directive AST node type (added in JLS9 API).
 UsesDirective:
     uses Name ;
 
Since:
3.14
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.
  • Field Details

    • NAME_PROPERTY

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

      public Name getName()
      Returns the name of the service in this directive.
      Returns:
      the name of the service
    • setName

      public void setName(Name name)
      Sets the name of the service in this directive.
      Parameters:
      name - the new name of the service
      Throws:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent