Class IndexedType.IndexedContainer
- java.lang.Object
-
- org.apache.commons.jexl3.internal.introspection.IndexedType.IndexedContainer
-
- Enclosing class:
- IndexedType
public static final class IndexedType.IndexedContainer extends java.lang.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 Summary
Fields Modifier and Type Field Description (package private) java.lang.Object
container
The container instance.(package private) IndexedType
type
The container type instance.
-
Constructor Summary
Constructors Constructor Description IndexedContainer(IndexedType theType, java.lang.Object theContainer)
Creates a new duck container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.Object key)
Gets a property from this indexed container.java.lang.Class<?>
getContainerClass()
Gets the property container class.java.lang.String
getContainerName()
Gets the property container name.java.lang.Object
set(java.lang.Object key, java.lang.Object value)
Sets a property in this indexed container.
-
-
-
Field Detail
-
container
final java.lang.Object container
The container instance.
-
type
final IndexedType type
The container type instance.
-
-
Constructor Detail
-
IndexedContainer
IndexedContainer(IndexedType theType, java.lang.Object theContainer)
Creates a new duck container.- Parameters:
theType
- the container typetheContainer
- the container instance
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.Object key) throws java.lang.Exception
Gets a property from this indexed container.- Parameters:
key
- the property key- Returns:
- the property value
- Throws:
java.lang.Exception
- if inner invocation fails
-
getContainerClass
public java.lang.Class<?> getContainerClass()
Gets the property container class.- Returns:
- the container class
-
getContainerName
public java.lang.String getContainerName()
Gets the property container name.- Returns:
- the container name
-
set
public java.lang.Object set(java.lang.Object key, java.lang.Object value) throws java.lang.Exception
Sets a property in this indexed container.- Parameters:
key
- the property keyvalue
- the property value- Returns:
- the invocation result (frequently null)
- Throws:
java.lang.Exception
- if inner invocation fails
-
-