Class ASTFactory.NewExprBuilder

  • Enclosing class:
    ASTFactory

    public static class ASTFactory.NewExprBuilder
    extends Object
    Builder for new object expressions.
    • Method Detail

      • withArgs

        public ASTFactory.NewExprBuilder withArgs​(Expression... args)
        Appends constructor arguments.
        Parameters:
        args - the arguments to append, in order
        Returns:
        this builder
      • build

        public NewExpr build()
        Builds the allocation typed as the allocated class.
        Returns:
        the allocation expression
      • asStatement

        public ExprStmt asStatement()
        Builds the allocation and wraps it as a statement.
        Returns:
        the statement