Class SandboxUberspectImpl
java.lang.Object
org.apache.commons.jexl2.internal.Introspector
org.apache.commons.jexl2.introspection.UberspectImpl
org.apache.commons.jexl2.introspection.SandboxUberspectImpl
- All Implemented Interfaces:
Uberspect
An uberspect that controls usage of properties, methods and contructors through a sandbox.
- Since:
- 2.1
-
Nested Class Summary
Nested classes/interfaces inherited from class UberspectImpl
UberspectImpl.FieldPropertyGet, UberspectImpl.FieldPropertySet, UberspectImpl.IndexedContainer -
Field Summary
FieldsFields inherited from class UberspectImpl
TRY_FAILEDFields inherited from class Introspector
rlog -
Constructor Summary
ConstructorsConstructorDescriptionSandboxUberspectImpl(org.apache.commons.logging.Log runtimeLogger, Sandbox theSandbox) A constructor for Sandbox uberspect. -
Method Summary
Modifier and TypeMethodDescriptiongetConstructorMethod(Object ctorHandle, Object[] args, JexlInfo info) Returns a class constructor wrapped in a JexlMethod.Returns a JexlMethod.getPropertyGet(Object obj, Object identifier, JexlInfo info) Property getter.getPropertySet(Object obj, Object identifier, Object arg, JexlInfo info) Property setter.voidsetLoader(ClassLoader cloader) Resets this Uberspect class loader.Methods inherited from class UberspectImpl
getConstructor, getField, getIndexedGet, getIteratorMethods inherited from class Introspector
base, getClassByName, getConstructor, getField, getFieldNames, getGetExecutor, getMethod, getMethod, getMethodExecutor, getMethodNames, getMethods, getSetExecutor, setClassLoader, toInteger, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Uberspect
setClassLoader
-
Field Details
-
sandbox
-
-
Constructor Details
-
SandboxUberspectImpl
A constructor for Sandbox uberspect.- Parameters:
runtimeLogger- the logger to use or null to use defaulttheSandbox- the sandbox instance to use
-
-
Method Details
-
setLoader
Resets this Uberspect class loader.- Overrides:
setLoaderin classUberspectImpl- Parameters:
cloader- the class loader to use
-
getConstructorMethod
Returns a class constructor wrapped in a JexlMethod.- Specified by:
getConstructorMethodin interfaceUberspect- Overrides:
getConstructorMethodin classUberspectImpl- Parameters:
ctorHandle- a class or class nameargs- constructor argumentsinfo- contextual information- Returns:
- a
Constructor
-
getMethod
Returns a JexlMethod.- Specified by:
getMethodin interfaceUberspect- Overrides:
getMethodin classUberspectImpl- Parameters:
obj- the objectmethod- the method nameargs- method argumentsinfo- contextual information- Returns:
- a
JexlMethod
-
getPropertyGet
Property getter.Returns JexlPropertyGet appropos for ${bar.woogie}.
- Specified by:
getPropertyGetin interfaceUberspect- Overrides:
getPropertyGetin classUberspectImpl- Parameters:
obj- the object to get the property fromidentifier- property nameinfo- contextual information- Returns:
- a
JexlPropertyGet
-
getPropertySet
Property setter.returns JelPropertySet appropos for ${foo.bar = "geir"}
.- Specified by:
getPropertySetin interfaceUberspect- Overrides:
getPropertySetin classUberspectImpl- Parameters:
obj- the object to get the property from.identifier- property namearg- value to setinfo- contextual information- Returns:
- a
JexlPropertySet.
-