Klasse Initializer


public class Initializer extends BodyDeclaration
Static or instance initializer AST node type.
 Initializer:
     [ static ] Block
 
Seit:
2.0
  • Felddetails

    • JAVADOC_PROPERTY

      public static final ChildPropertyDescriptor JAVADOC_PROPERTY
      The "javadoc" structural property of this node type (child type: Javadoc).
      Seit:
      3.0
    • MODIFIERS_PROPERTY

      public static final SimplePropertyDescriptor MODIFIERS_PROPERTY
      Veraltet.
      In the JLS3 API, this property is replaced by MODIFIERS2_PROPERTY.
      The "modifiers" structural property of this node type (type: Integer) (JLS2 API only).
      Seit:
      3.0
    • MODIFIERS2_PROPERTY

      public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY
      The "modifiers" structural property of this node type (element type: IExtendedModifier) (added in JLS3 API).
      Seit:
      3.1
    • BODY_PROPERTY

      public static final ChildPropertyDescriptor BODY_PROPERTY
      The "body" structural property of this node type (child type: Block).
      Seit:
      3.0
  • Methodendetails

    • propertyDescriptors

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

      public Block getBody()
      Returns the body of this initializer declaration.
      Gibt zurück:
      the initializer body
    • setBody

      public void setBody(Block body)
      Sets the body of this initializer declaration.
      Parameter:
      body - the block node
      Löst aus:
      IllegalArgumentException - if:
      • the node belongs to a different AST
      • the node already has a parent
      • a cycle in would be created