fluentast-core / at.hschroedl.fluentast.ast / FluentVariableDeclarationFragment
FluentVariableDeclarationFragment
abstract class FluentVariableDeclarationFragment :
FluentVariableDeclaration
(source)
A wrapper class for VariableDeclarationFragment. Fragements are used to declare or initialize values.
- Java Code:
i = 1
Using JDT:
VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
fragment.setName(ast.newSimpleName("i"));
fragment.setInitializer(ast.newNumberLiteral("1"));
Using Fluentast:
VariableDeclarationFragment fragment = fragment("i", i(1))).build(ast);
Constructors
<init> | FluentVariableDeclarationFragment(name: String , initializer: FluentExpression ? = null) takes a string representing the name and a FluentExpression as initializer. |
Functions
build | open fun build(ast: AST ): VariableDeclarationFragment |
Inheritors
FluentVariableDeclarationFragmentImpl | class FluentVariableDeclarationFragmentImpl : FluentVariableDeclarationFragment |
Generated using Dokka.