Package io.micronaut.expressions.util
Class EvaluatedExpressionsUtils
java.lang.Object
io.micronaut.expressions.util.EvaluatedExpressionsUtils
Utility class for working with annotation metadata containing
evaluated expressions.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassElement
evaluateExpressionType
(VisitorContext visitorContext, ClassElement thisElement, EvaluatedExpressionReference reference) Evaluates the expression return type.static ClassElement
evaluateExpressionType
(VisitorContext visitorContext, MethodElement methodElement, EvaluatedExpressionReference reference) Evaluates the expression return type.findEvaluatedExpressionReferences
(AnnotationMetadata annotationMetadata) Finds evaluated expression references in provided annotation metadata, including nested annotation values.
-
Constructor Details
-
EvaluatedExpressionsUtils
public EvaluatedExpressionsUtils()
-
-
Method Details
-
evaluateExpressionType
public static ClassElement evaluateExpressionType(VisitorContext visitorContext, MethodElement methodElement, EvaluatedExpressionReference reference) Evaluates the expression return type.- Parameters:
visitorContext
- The visitor contextmethodElement
- The method elementreference
- The expression reference- Returns:
- The resolved type
- Since:
- 4.3.0
-
evaluateExpressionType
public static ClassElement evaluateExpressionType(VisitorContext visitorContext, ClassElement thisElement, EvaluatedExpressionReference reference) Evaluates the expression return type.- Parameters:
visitorContext
- The visitor contextthisElement
- The this elementreference
- The expression reference- Returns:
- The resolved type
- Since:
- 4.3.0
-
findEvaluatedExpressionReferences
public static Collection<EvaluatedExpressionReference> findEvaluatedExpressionReferences(AnnotationMetadata annotationMetadata) Finds evaluated expression references in provided annotation metadata, including nested annotation values.- Parameters:
annotationMetadata
- metadata to search references in- Returns:
- collection of expression references
-