Class ASTFactory.NewExprBuilder
- java.lang.Object
-
- com.tonic.analysis.source.editor.util.ASTFactory.NewExprBuilder
-
- Enclosing class:
- ASTFactory
public static class ASTFactory.NewExprBuilder extends Object
Builder for new object expressions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExprStmtasStatement()Builds the allocation and wraps it as a statement.NewExprbuild()Builds the allocation typed as the allocated class.ASTFactory.NewExprBuilderwithArgs(Expression... args)Appends constructor arguments.ASTFactory.NewExprBuilderwithArgs(List<Expression> args)Appends constructor arguments.
-
-
-
Method Detail
-
withArgs
public ASTFactory.NewExprBuilder withArgs(Expression... args)
Appends constructor arguments.- Parameters:
args- the arguments to append, in order- Returns:
- this builder
-
withArgs
public ASTFactory.NewExprBuilder withArgs(List<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
-
-