Class ConstructorNodeBuilder


  • public final class ConstructorNodeBuilder
    extends Object
    Builder to create instance of type ConstructorNode e.g. having a class named "MyClass" if we liked to create a default constructor, we can achieve it by writing the following:

    AST
    
     constructor(A.ACC.ACC_PUBLIC)
     .code(callThisX("println", constX("constructor initialized")))
     .build()
    Result
    
     public MyClass() {
         println "constructor initialized"
     }
     
    Since:
    0.1.5