UberspectSandboxUberspectImplpublic class UberspectImpl extends Introspector implements Uberspect
This is the class to derive to customize introspection.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
UberspectImpl.FieldPropertyGet |
Deprecated.
Do not use externally - will be made private in a later version
|
static class |
UberspectImpl.FieldPropertySet |
Deprecated.
Do not use externally - will be made private in a later version
|
static class |
UberspectImpl.IndexedContainer |
A generic indexed property container, exposes get(key) and set(key, value) and solves method call dynamically
based on arguments.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.Object |
TRY_FAILED |
Publicly exposed special failure object returned by tryInvoke.
|
rlog| Constructor | Description |
|---|---|
UberspectImpl(org.apache.commons.logging.Log runtimeLogger) |
Creates a new UberspectImpl.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.reflect.Constructor<?> |
getConstructor(java.lang.Object ctorHandle,
java.lang.Object[] args,
JexlInfo info) |
Deprecated.
|
JexlMethod |
getConstructorMethod(java.lang.Object ctorHandle,
java.lang.Object[] args,
JexlInfo info) |
Returns a class constructor wrapped in a JexlMethod.
|
java.lang.reflect.Field |
getField(java.lang.Object obj,
java.lang.String name,
JexlInfo info) |
Returns a class field.
|
protected JexlPropertyGet |
getIndexedGet(java.lang.Object object,
java.lang.String name) |
Attempts to find an indexed-property getter in an object.
|
java.util.Iterator<?> |
getIterator(java.lang.Object obj,
JexlInfo info) |
Gets an iterator from an object.
|
JexlMethod |
getMethod(java.lang.Object obj,
java.lang.String method,
java.lang.Object[] args,
JexlInfo info) |
Returns a JexlMethod.
|
JexlPropertyGet |
getPropertyGet(java.lang.Object obj,
java.lang.Object identifier,
JexlInfo info) |
Property getter.
|
JexlPropertySet |
getPropertySet(java.lang.Object obj,
java.lang.Object identifier,
java.lang.Object arg,
JexlInfo info) |
Property setter.
|
void |
setLoader(java.lang.ClassLoader cloader) |
Resets this Uberspect class loader.
|
base, getClassByName, getConstructor, getField, getFieldNames, getGetExecutor, getMethod, getMethod, getMethodExecutor, getMethodNames, getMethods, getSetExecutor, setClassLoader, toInteger, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetClassLoaderpublic static final java.lang.Object TRY_FAILED
public UberspectImpl(org.apache.commons.logging.Log runtimeLogger)
runtimeLogger - the logger used for all logging needspublic void setLoader(java.lang.ClassLoader cloader)
cloader - the class loader to usepublic java.util.Iterator<?> getIterator(java.lang.Object obj, JexlInfo info)
getIterator in interface Uberspectobj - to get the iterator forinfo - contextual informationpublic JexlMethod getMethod(java.lang.Object obj, java.lang.String method, java.lang.Object[] args, JexlInfo info)
getMethod in interface Uberspectobj - the objectmethod - the method nameargs - method argumentsinfo - contextual informationJexlMethod@Deprecated public java.lang.reflect.Constructor<?> getConstructor(java.lang.Object ctorHandle, java.lang.Object[] args, JexlInfo info)
getConstructor in interface UberspectctorHandle - a class or class nameargs - constructor argumentsinfo - contextual informationConstructorpublic JexlMethod getConstructorMethod(java.lang.Object ctorHandle, java.lang.Object[] args, JexlInfo info)
getConstructorMethod in interface UberspectctorHandle - a class or class nameargs - constructor argumentsinfo - contextual informationConstructorpublic JexlPropertyGet getPropertyGet(java.lang.Object obj, java.lang.Object identifier, JexlInfo info)
Returns JexlPropertyGet appropos for ${bar.woogie}.
getPropertyGet in interface Uberspectobj - the object to get the property fromidentifier - property nameinfo - contextual informationJexlPropertyGetpublic JexlPropertySet getPropertySet(java.lang.Object obj, java.lang.Object identifier, java.lang.Object arg, JexlInfo info)
returns JelPropertySet appropos for ${foo.bar = "geir"}
.getPropertySet in interface Uberspectobj - the object to get the property from.identifier - property namearg - value to setinfo - contextual informationJexlPropertySet.public java.lang.reflect.Field getField(java.lang.Object obj, java.lang.String name, JexlInfo info)
obj - the objectname - the field nameinfo - debug infoField.protected JexlPropertyGet getIndexedGet(java.lang.Object object, java.lang.String name)
object - the objectname - the container name