Class IntrospectionELResolver
java.lang.Object
jakarta.el.ELResolver
io.micronaut.el.resolver.IntrospectionELResolver
- All Implemented Interfaces:
io.micronaut.core.order.Ordered, ELMethodExecutor
@Internal
public final class IntrospectionELResolver
extends jakarta.el.ELResolver
implements ELMethodExecutor
The
ELResolver resolving the types annotated with Introspected
through the bean introspection generated for them at compilation time.
The properties are read and written through the generated BeanIntrospection, so no reflection is
used. The methods annotated with io.micronaut.context.annotation.Executable are invoked the same way;
the other methods are left to the rest of the chain. A type without an introspection is left unresolved, so
that the standard resolvers of the specification can handle it.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a resolver using the shared introspector.IntrospectionELResolver(boolean readOnly) IntrospectionELResolver(io.micronaut.core.beans.BeanIntrospector introspector, boolean readOnly) -
Method Summary
Modifier and TypeMethodDescription@Nullable Class<?> getCommonPropertyType(jakarta.el.ELContext context, @Nullable Object base) intgetOrder()Returns the executor order.@Nullable Class<?> @Nullable Object@Nullable Objectinvoke(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object method, Class<?> @Nullable [] paramTypes, Object @Nullable [] params) booleanisReadOnly(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property) @Nullable ELMethodresolve(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object method, io.micronaut.core.type.Argument<?> @Nullable [] argumentTypes, Object @Nullable [] arguments) Resolves an instance or static method, or a constructor represented by<init>.voidsetValue(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property, @Nullable Object value) Methods inherited from class jakarta.el.ELResolver
convertToTypeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ELMethodExecutor
isReflective, resolveFunction
-
Constructor Details
-
IntrospectionELResolver
public IntrospectionELResolver()Creates a resolver using the shared introspector. -
IntrospectionELResolver
public IntrospectionELResolver(boolean readOnly) - Parameters:
readOnly- Whether the resolver should reject the assignment of properties
-
IntrospectionELResolver
public IntrospectionELResolver(io.micronaut.core.beans.BeanIntrospector introspector, boolean readOnly) - Parameters:
introspector- The introspectorreadOnly- Whether the resolver should reject the assignment of properties
-
-
Method Details
-
getOrder
public int getOrder()Description copied from interface:ELMethodExecutorReturns the executor order. Lower values run first, following the MicronautOrderedcontract, so direct/generated implementations can take precedence over a general fallback such as reflection.- Specified by:
getOrderin interfaceELMethodExecutor- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered- Returns:
- The order, zero by default
-
getValue
-
getType
-
setValue
-
isReadOnly
-
invoke
-
resolve
public @Nullable ELMethod resolve(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object method, io.micronaut.core.type.Argument<?> @Nullable [] argumentTypes, Object @Nullable [] arguments) Description copied from interface:ELMethodExecutorResolves an instance or static method, or a constructor represented by<init>.- Specified by:
resolvein interfaceELMethodExecutor- Parameters:
context- The EL contextbase- The instance, or anELClassfor a static method or constructormethod- The method nameargumentTypes- The parameter types supplied when the method expression was created, ornullarguments- The evaluated arguments, ornull- Returns:
- The resolved method, or
nullwhen this executor does not handle it
-
getCommonPropertyType
-