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 ExpressionEvaluationContext evaluationContext)
extends Record
Metadata for evaluated expression used at compilation time
to generate expression class.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionWithContext(@NonNull EvaluatedExpressionReference expressionReference, @NonNull ExpressionEvaluationContext evaluationContext) Creates an instance of aExpressionWithContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionProvides initial annotation value treated as evaluated expression.booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluationContextrecord component.Provides generated class name for this expression.Returns the value of theexpressionReferencerecord component.inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExpressionWithContext
public ExpressionWithContext(@NonNull @NonNull EvaluatedExpressionReference expressionReference, @NonNull @NonNull ExpressionEvaluationContext evaluationContext) Creates an instance of aExpressionWithContextrecord class.- Parameters:
expressionReference- the value for theexpressionReferencerecord componentevaluationContext- the value for theevaluationContextrecord 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
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
expressionReference
Returns the value of theexpressionReferencerecord component.- Returns:
- the value of the
expressionReferencerecord component
-
evaluationContext
Returns the value of theevaluationContextrecord component.- Returns:
- the value of the
evaluationContextrecord component
-