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
Nested ClassesModifier 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.ComparisonOperation, 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.Lambda, ExpressionDef.MathBinaryOperation, ExpressionDef.MathUnaryOperation, ExpressionDef.NewArrayInitialized, ExpressionDef.NewArrayOfSize, ExpressionDef.NewInstance, ExpressionDef.NotEqualsReferentially, ExpressionDef.NotEqualsStructurally, 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.default Stream<? extends ExpressionDef>
Stream of nested expressions included in this expression.Methods inherited from interface io.micronaut.sourcegen.model.ExpressionDef
arrayElement, arrayElement, asExpressionSwitch, asStatementSwitch, asStatementSwitch, cast, cast, compare, 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, invoke, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeConstructor, invokeGetClass, invokeHashCode, isFalse, isNonNull, isNull, isTrue, math, math, newLocal, newLocal, notEqualsReferentially, notEqualsStructurally, returning, type, whileLoop
-
Method Details
-
nestedExpressionsStream
Description copied from interface:ExpressionDef
Stream of nested expressions included in this expression.- Specified by:
nestedExpressionsStream
in interfaceExpressionDef
- Returns:
- The expressions
-
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
-