Package io.micronaut.sourcegen.model
Interface VariableDef
- All Superinterfaces:
ExpressionDef
- All Known Implementing Classes:
VariableDef.ExceptionVar
,VariableDef.Field
,VariableDef.Local
,VariableDef.MethodParameter
,VariableDef.StaticField
,VariableDef.Super
,VariableDef.This
public sealed interface VariableDef
extends ExpressionDef
permits VariableDef.ExceptionVar, VariableDef.Field, VariableDef.Local, VariableDef.MethodParameter, VariableDef.StaticField, VariableDef.Super, VariableDef.This
The variable definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
The exception that is part of Try-Catch block.static 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 `super`.static final record
The variable of `this`.Nested classes/interfaces inherited from interface io.micronaut.sourcegen.model.ExpressionDef
ExpressionDef.And, ExpressionDef.ArrayElement, ExpressionDef.Cast, ExpressionDef.Condition, ExpressionDef.ConditionExpressionDef, ExpressionDef.Constant, ExpressionDef.EqualsReferentially, ExpressionDef.EqualsStructurally, ExpressionDef.GetPropertyValue, ExpressionDef.IfElse, ExpressionDef.InstanceOf, ExpressionDef.InvokeGetClassMethod, ExpressionDef.InvokeHashCodeMethod, ExpressionDef.InvokeInstanceMethod, ExpressionDef.InvokeStaticMethod, ExpressionDef.IsFalse, ExpressionDef.IsNotNull, ExpressionDef.IsNull, ExpressionDef.IsTrue, ExpressionDef.MathOp, 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
arrayElement, asCondition, asExpressionSwitch, asStatementSwitch, asStatementSwitch, cast, cast, doThrow, equalsReferentially, equalsStructurally, field, field, field, getPropertyValue, ifFalse, ifFalse, ifFalse, ifNonNull, ifNonNull, ifNonNull, ifNull, ifNull, ifNull, ifTrue, ifTrue, ifTrue, instanceOf, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeGetClass, invokeHashCode, isFalse, isNonNull, isNull, isTrue, math, 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
-