Class IndexedType.IndexedContainer

java.lang.Object
org.apache.commons.jexl3.internal.introspection.IndexedType.IndexedContainer
Enclosing class:
IndexedType

public static final class IndexedType.IndexedContainer extends Object
A generic indexed property container, exposes get(key) and set(key, value) and solves method call dynamically based on arguments.

Must remain public for introspection purpose.

  • Field Details

    • container

      final Object container
      The container instance.
    • type

      final IndexedType type
      The container type instance.
  • Constructor Details

    • IndexedContainer

      IndexedContainer(IndexedType theType, Object theContainer)
      Creates a new duck container.
      Parameters:
      theType - the container type
      theContainer - the container instance
  • Method Details

    • getContainerName

      public String getContainerName()
      Gets the property container name.
      Returns:
      the container name
    • getContainerClass

      public Class<?> getContainerClass()
      Gets the property container class.
      Returns:
      the container class
    • get

      public Object get(Object key) throws Exception
      Gets a property from this indexed container.
      Parameters:
      key - the property key
      Returns:
      the property value
      Throws:
      Exception - if inner invocation fails
    • set

      public Object set(Object key, Object value) throws Exception
      Sets a property in this indexed container.
      Parameters:
      key - the property key
      value - the property value
      Returns:
      the invocation result (frequently null)
      Throws:
      Exception - if inner invocation fails