Record Class ExpressionWithContext

java.lang.Object
java.lang.Record
io.micronaut.expressions.context.ExpressionWithContext
Record Components:
expressionReference - reference to evaluated expression in annotation
evaluationContext - 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 Details

  • Method Details

    • annotationValue

      @NonNull public @NonNull Object annotationValue()
      Provides initial annotation value treated as evaluated expression.
      Returns:
      initial annotation value
    • expressionClassName

      @NonNull public @NonNull String expressionClassName()
      Provides generated class name for this expression.
      Returns:
      expression class name
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • expressionReference

      @NonNull public @NonNull EvaluatedExpressionReference expressionReference()
      Returns the value of the expressionReference record component.
      Returns:
      the value of the expressionReference record component
    • evaluationContext

      @NonNull public @NonNull ExpressionCompilationContext evaluationContext()
      Returns the value of the evaluationContext record component.
      Returns:
      the value of the evaluationContext record component