Record Class ELExpressionDefinition
java.lang.Object
java.lang.Record
io.micronaut.el.processor.compiler.ELExpressionDefinition
- Record Components:
expression- The expression stringexpectedType- The expected type of the evaluation resultinferred- Whether the type was inferred from the static type of the expression rather than declaredconstantName- The name of the generated constantnode- The parsed expression
@Internal
public record ELExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement expectedType, boolean inferred, String constantName, ELNode node)
extends Record
A value expression declared with
io.micronaut.el.annotation.ELExpression.- Since:
- 1.0
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorsConstructorDescriptionELExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement expectedType, boolean inferred, String constantName, ELNode node) Creates an instance of aELExpressionDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstantNamerecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable io.micronaut.inject.ast.ClassElementReturns the value of theexpectedTyperecord component.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.booleaninferred()Returns the value of theinferredrecord component.inferring(io.micronaut.inject.ast.ClassElement type) A definition whose expected type was omitted, resolved to the static type of the expression.node()Returns the value of thenoderecord component.io.micronaut.inject.ast.ClassElementfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ELExpressionDefinition
public ELExpressionDefinition(String expression, @Nullable io.micronaut.inject.ast.ClassElement expectedType, boolean inferred, String constantName, ELNode node) Creates an instance of aELExpressionDefinitionrecord class.- Parameters:
expression- the value for theexpressionrecord componentexpectedType- the value for theexpectedTyperecord componentinferred- the value for theinferredrecord componentconstantName- the value for theconstantNamerecord componentnode- the value for thenoderecord component
-
-
Method Details
-
inferring
A definition whose expected type was omitted, resolved to the static type of the expression.- Parameters:
type- The inferred type- Returns:
- The definition with the type
-
requireExpectedType
public io.micronaut.inject.ast.ClassElement requireExpectedType()- Returns:
- The expected type, which inference has resolved by the time a writer reads it
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
expectedType
public @Nullable io.micronaut.inject.ast.ClassElement expectedType()Returns the value of theexpectedTyperecord component.- Returns:
- the value of the
expectedTyperecord component
-
inferred
-
constantName
Returns the value of theconstantNamerecord component.- Returns:
- the value of the
constantNamerecord component
-
node
-