Package io.micronaut.sourcegen.model
Interface VariableDef
- All Superinterfaces:
ExpressionDef
- All Known Implementing Classes:
VariableDef.Field
,VariableDef.Local
,VariableDef.MethodParameter
,VariableDef.StaticField
,VariableDef.This
public sealed interface VariableDef
extends ExpressionDef
permits VariableDef.Field, VariableDef.Local, VariableDef.MethodParameter, VariableDef.StaticField, VariableDef.This
The variable definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
The variable of a field.static final record
The local variable.static final record
The variable of a method parameter.static final record
The variable of a static field.static final record
The variable of `this`.Nested classes/interfaces inherited from interface io.micronaut.sourcegen.model.ExpressionDef
ExpressionDef.And, ExpressionDef.CallInstanceMethod, ExpressionDef.CallStaticMethod, ExpressionDef.Cast, ExpressionDef.Condition, ExpressionDef.Constant, ExpressionDef.Convert, ExpressionDef.EqualsReferentially, ExpressionDef.EqualsStructurally, ExpressionDef.GetPropertyValue, ExpressionDef.IfElse, ExpressionDef.InvokeGetClassMethod, ExpressionDef.InvokeHashCodeMethod, ExpressionDef.NewArrayInitialized, ExpressionDef.NewArrayOfSize, ExpressionDef.NewInstance, ExpressionDef.Or, ExpressionDef.Switch, ExpressionDef.SwitchYieldCase
-
Method Summary
Modifier and TypeMethodDescriptiondefault StatementDef
assign
(ExpressionDef expression) Assign this variable an expression.default StatementDef
assign
(ParameterDef parameterDef) Assign this variable a parameter value.Methods inherited from interface io.micronaut.sourcegen.model.ExpressionDef
asCondition, asConditionAnd, asConditionIf, asConditionIfElse, asConditionIfElse, asConditionOr, asExpressionSwitch, asStatementSwitch, cast, convert, equalsReferentially, equalsStructurally, field, field, getPropertyValue, invoke, invoke, invoke, invoke, invoke, invokeGetClass, invokeHashCode, isNonNull, isNull, newLocal, newLocal, returning, type, whileLoop
-
Method Details
-
assign
Assign this variable an expression.- Parameters:
expression
- The expression.- Returns:
- The statement
-
assign
Assign this variable a parameter value.- Parameters:
parameterDef
- The parameterDef.- Returns:
- The statement
-