Class IntrospectionELResolver

java.lang.Object
jakarta.el.ELResolver
io.micronaut.el.resolver.IntrospectionELResolver

@Internal public final class IntrospectionELResolver extends jakarta.el.ELResolver
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
  • 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 introspector
      readOnly - Whether the resolver should reject the assignment of properties
  • Method Details

    • getValue

      public @Nullable Object getValue(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property)
      Specified by:
      getValue in class jakarta.el.ELResolver
    • getType

      public @Nullable Class<?> getType(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property)
      Specified by:
      getType in class jakarta.el.ELResolver
    • setValue

      public void setValue(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property, @Nullable Object value)
      Specified by:
      setValue in class jakarta.el.ELResolver
    • isReadOnly

      public boolean isReadOnly(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object property)
      Specified by:
      isReadOnly in class jakarta.el.ELResolver
    • invoke

      public @Nullable Object invoke(jakarta.el.ELContext context, @Nullable Object base, @Nullable Object method, Class<?> @Nullable [] paramTypes, Object @Nullable [] params)
      Overrides:
      invoke in class jakarta.el.ELResolver
    • getCommonPropertyType

      public @Nullable Class<?> getCommonPropertyType(jakarta.el.ELContext context, @Nullable Object base)
      Specified by:
      getCommonPropertyType in class jakarta.el.ELResolver