Package io.micronaut.expressions.context
Record Class ExpressionWithContext
java.lang.Object
java.lang.Record
io.micronaut.expressions.context.ExpressionWithContext
- Record Components:
expressionReference
- reference to evaluated expression in annotationevaluationContext
- the context against which expression will be evaluated
@Internal
public record ExpressionWithContext(@NonNull EvaluatedExpressionReference expressionReference, @NonNull ExpressionCompilationContext evaluationContext)
extends Record
Metadata for evaluated expression used at compilation time
to generate expression class.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Constructor Summary
ConstructorDescriptionExpressionWithContext
(@NonNull EvaluatedExpressionReference expressionReference, @NonNull ExpressionCompilationContext evaluationContext) Creates an instance of aExpressionWithContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionProvides initial annotation value treated as evaluated expression.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theevaluationContext
record component.Provides generated class name for this expression.Returns the value of theexpressionReference
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ExpressionWithContext
public ExpressionWithContext(@NonNull @NonNull EvaluatedExpressionReference expressionReference, @NonNull @NonNull ExpressionCompilationContext evaluationContext) Creates an instance of aExpressionWithContext
record class.- Parameters:
expressionReference
- the value for theexpressionReference
record componentevaluationContext
- the value for theevaluationContext
record component
-
-
Method Details
-
annotationValue
Provides initial annotation value treated as evaluated expression.- Returns:
- initial annotation value
-
expressionClassName
Provides generated class name for this expression.- Returns:
- expression class name
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
expressionReference
Returns the value of theexpressionReference
record component.- Returns:
- the value of the
expressionReference
record component
-
evaluationContext
Returns the value of theevaluationContext
record component.- Returns:
- the value of the
evaluationContext
record component
-