public class ResolverUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static ValueResolver<?> |
getExpressionBasedValueResolver(String expression,
org.mule.metadata.api.model.MetadataType metadataType,
MuleContext muleContext) |
static Object |
resolveCursor(Object value)
Obtains a
Cursor based on the value, if one is available. |
static org.mule.runtime.api.metadata.TypedValue<?> |
resolveCursor(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
Obtains a
TypedValue of Cursor based on the given typedValue, if one is available. |
static Object |
resolveCursorAsUnclosable(Object value)
Obtains a
Cursor based on the value, if one is available. |
static org.mule.runtime.api.metadata.TypedValue<?> |
resolveCursorAsUnclosable(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
Obtains a
TypedValue of Cursor based on the given typedValue, if one is available. |
static <T> T |
resolveRecursively(ValueResolver<T> valueResolver,
ValueResolvingContext resolvingContext) |
static <T> T |
resolveValue(ValueResolver<T> resolver,
ValueResolvingContext context)
Executes the
resolver using the given context, applying all the required resolution rules that may apply for
the given T type. |
static Object |
typedValueAsUnclosable(Object value)
If the value given is a
CursorStream or a TypedValue of a CursorStream, it will be wrapped inside
UnclosableCursorStream. |
static org.mule.runtime.api.metadata.TypedValue<?> |
typedValueAsUnclosable(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
If the value of the given
TypedValue is a CursorStream, it will be wrapped inside
UnclosableCursorStream. |
public static ValueResolver<?> getExpressionBasedValueResolver(String expression, org.mule.metadata.api.model.MetadataType metadataType, MuleContext muleContext)
public static <T> T resolveRecursively(ValueResolver<T> valueResolver, ValueResolvingContext resolvingContext) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic static <T> T resolveValue(ValueResolver<T> resolver, ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
resolver using the given context, applying all the required resolution rules that may apply for
the given T type.resolver - the ValueResolver to executecontext - the ValueResolvingContext to pass on the resolverorg.mule.runtime.api.exception.MuleExceptionpublic static Object resolveCursor(Object value)
Cursor based on the value, if one is available.value but converting a CursorProvider to a Cursor if any is present.public static org.mule.runtime.api.metadata.TypedValue<?> resolveCursor(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
TypedValue of Cursor based on the given typedValue, if one is available.typedValue but converting a CursorProvider to a Cursor if any is present.public static Object resolveCursorAsUnclosable(Object value)
Cursor based on the value, if one is available. Additionally, if the resulting cursor is a
CursorStream, it would be wrapped inside UnclosableCursorStream.
For performance reasons, we want to avoid receiving the decorator as a parameter.value but converting a CursorProvider to a Cursor if any is present.public static org.mule.runtime.api.metadata.TypedValue<?> resolveCursorAsUnclosable(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
TypedValue of Cursor based on the given typedValue, if one is available. Additionally, if
the resulting cursor is a CursorStream, it will be wrapped inside UnclosableCursorStream.
For performance reasons, we want to avoid receiving the decorator as a parameter.typedValue but converting a CursorProvider to a Cursor if any is present.public static Object typedValueAsUnclosable(Object value)
CursorStream or a TypedValue of a CursorStream, it will be wrapped inside
UnclosableCursorStream.public static org.mule.runtime.api.metadata.TypedValue<?> typedValueAsUnclosable(org.mule.runtime.api.metadata.TypedValue<?> typedValue)
TypedValue is a CursorStream, it will be wrapped inside
UnclosableCursorStream.Copyright © 2003–2025 MuleSoft, Inc.. All rights reserved.