org.apache.commons.jexl3.introspection
Interface Uberspect

All Known Implementing Classes:
SandboxUberspect, Uberspect

public interface Uberspect

'Federated' introspection/reflection interface to allow the introspection behavior in JEXL to be customized.

Since:
1.0

Method Summary
 JexlMethod getConstructor(Object ctorHandle, Object[] args, JexlInfo.Handle info)
          Returns a class constructor.
 Iterator<?> getIterator(Object obj, JexlInfo.Handle info)
          Gets an iterator from an object.
 JexlMethod getMethod(Object obj, String method, Object[] args, JexlInfo.Handle info)
          Returns a JexlMethod.
 JexlPropertyGet getPropertyGet(Object obj, Object identifier, JexlInfo.Handle info)
          Property getter.
 JexlPropertySet getPropertySet(Object obj, Object identifier, Object arg, JexlInfo.Handle info)
          Property setter.
 void setClassLoader(ClassLoader loader)
          Sets the class loader to use when getting a constructor with a class name parameter.
 

Method Detail

setClassLoader

void setClassLoader(ClassLoader loader)
Sets the class loader to use when getting a constructor with a class name parameter.

Parameters:
loader - the class loader

getConstructor

JexlMethod getConstructor(Object ctorHandle,
                          Object[] args,
                          JexlInfo.Handle info)
Returns a class constructor.

Parameters:
ctorHandle - a class or class name
args - constructor arguments
info - contextual information
Returns:
a JexlMethod
Since:
3.0

getMethod

JexlMethod getMethod(Object obj,
                     String method,
                     Object[] args,
                     JexlInfo.Handle info)
Returns a JexlMethod.

Parameters:
obj - the object
method - the method name
args - method arguments
info - contextual information
Returns:
a JexlMethod

getPropertyGet

JexlPropertyGet getPropertyGet(Object obj,
                               Object identifier,
                               JexlInfo.Handle info)
Property getter.

Returns JexlPropertyGet appropos for ${bar.woogie}.

Parameters:
obj - the object to get the property from
identifier - property name
info - contextual information
Returns:
a JexlPropertyGet

getPropertySet

JexlPropertySet getPropertySet(Object obj,
                               Object identifier,
                               Object arg,
                               JexlInfo.Handle info)
Property setter.

returns JelPropertySet appropos for ${foo.bar = "geir"}

.

Parameters:
obj - the object to get the property from.
identifier - property name
arg - value to set
info - contextual information
Returns:
a JexlPropertySet.

getIterator

Iterator<?> getIterator(Object obj,
                        JexlInfo.Handle info)
Gets an iterator from an object.

Parameters:
obj - to get the iterator for
info - contextual information
Returns:
an iterator over obj


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.