Class ConstructorNode

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class ConstructorNode extends MethodNode
Represents a constructor declaration
  • Constructor Details

    • ConstructorNode

      protected ConstructorNode()
      Leaves the constructor unset so a subclass can fill the declaration in later. The name stays null and no exceptions are recorded.
    • ConstructorNode

      public ConstructorNode(int modifiers, Statement code)
      Creates a constructor with no parameters and no checked exceptions.
      Parameters:
      modifiers - JVM access flags for the constructor
      code - constructor body
    • ConstructorNode

      public ConstructorNode(int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code)
      Creates a constructor named <init> whose return type is void.
      Parameters:
      modifiers - JVM access flags for the constructor
      parameters - constructor parameters
      exceptions - checked exceptions declared on the constructor
      code - constructor body
  • Method Details

    • firstStatementIsSpecialConstructorCall

      public boolean firstStatementIsSpecialConstructorCall()
      Reports whether the first statement is a this(...) or super(...) call.
      Returns:
      true when that statement is a special constructor call