Package io.micronaut.core.expressions
Record Class EvaluatedExpressionReference
java.lang.Object
java.lang.Record
io.micronaut.core.expressions.EvaluatedExpressionReference
- Record Components:
annotationValue
- initial annotation value which is treated as evaluated expressionannotationName
- name of the annotation in which evaluated expression is used.annotationMember
- annotation member for which evaluated expression is usedexpressionClassName
- name for the class which is generated at compilation time and contains expression evaluation logic
@Internal
public record EvaluatedExpressionReference(@NonNull Object annotationValue, @NonNull String annotationName, @NonNull String annotationMember, @NonNull String expressionClassName)
extends Record
Wrapper for annotation value, containing evaluated expressions and
class name for generated expression class. This class is only used
at compilation time as part of compile-time annotation metadata.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMember
record component.Returns the value of theannotationName
record component.Returns the value of theannotationValue
record component.boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpressionClassName
record component.int
hashCode()
Returns a hash code value for this object.static Integer
Provides next expression index for passed class name.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
EXPR_SUFFIX
- See Also:
-
-
Constructor Details
-
EvaluatedExpressionReference
public EvaluatedExpressionReference(@NonNull @NonNull Object annotationValue, @NonNull @NonNull String annotationName, @NonNull @NonNull String annotationMember, @NonNull @NonNull String expressionClassName) Creates an instance of aEvaluatedExpressionReference
record class.- Parameters:
annotationValue
- the value for theannotationValue
record componentannotationName
- the value for theannotationName
record componentannotationMember
- the value for theannotationMember
record componentexpressionClassName
- the value for theexpressionClassName
record component
-
-
Method Details
-
nextIndex
Provides next expression index for passed class name. In general indexes are needed only to make names of generated expression classes unique and avoid conflicts in cases when multiple expressions are defined in the same class. On each invocation with the same argument this method will return value incremented by 1. On first invocation it will return 0- Parameters:
className
- name of class owning evaluated expression- Returns:
- next index
-
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. -
annotationValue
Returns the value of theannotationValue
record component.- Returns:
- the value of the
annotationValue
record component
-
annotationName
Returns the value of theannotationName
record component.- Returns:
- the value of the
annotationName
record component
-
annotationMember
Returns the value of theannotationMember
record component.- Returns:
- the value of the
annotationMember
record component
-
expressionClassName
Returns the value of theexpressionClassName
record component.- Returns:
- the value of the
expressionClassName
record component
-