fluentast-core / at.hschroedl.fluentast.ast.expression / FluentVariableDeclarationExpression
FluentVariableDeclarationExpression
class FluentVariableDeclarationExpression : FluentExpression (source)
A wrapper class for VariableDeclarationExpression.
Use convenience methods from at.hschroedl.fluentast to create instances of this class.
Java Code:
boolean i = true
Using JDT:
VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
fragment.setName(ast.newSimpleName("i"));
fragment.setInitializer(ast.newBooleanLiteral(true));
VariableDeclarationExpression statement = ast.newVariableDeclarationExpression(fragment);
statement.setType(ast.newPrimitiveType(PrimitiveType.BOOLEAN));
Using Fluentast:
VariableDeclarationExpression exp = decl("i", true).build(ast);
Functions
| build | fun build(ast: AST): VariableDeclarationExpression |
Inherited Functions
| build | open fun build(): Expression |
| field | fun field(fieldName: String): FluentFieldAccess |
| index | fun index(expression: FluentExpression): FluentArrayAccess |
Generated using Dokka.