org.apache.commons.jexl2.introspection
Interface Uberspect

All Known Implementing Classes:
SandboxUberspectImpl, UberspectImpl

public interface Uberspect

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

Since:
1.0

Method Summary
 Constructor<?> getConstructor(Object ctorHandle, Object[] args, JexlInfo info)
          Deprecated. 
 JexlMethod getConstructorMethod(Object ctorHandle, Object[] args, JexlInfo info)
          Returns a class constructor wrapped in a JexlMethod.
 Iterator<?> getIterator(Object obj, JexlInfo info)
          Gets an iterator from an object.
 JexlMethod getMethod(Object obj, String method, Object[] args, JexlInfo info)
          Returns a JexlMethod.
 JexlPropertyGet getPropertyGet(Object obj, Object identifier, JexlInfo info)
          Property getter.
 JexlPropertySet getPropertySet(Object obj, Object identifier, Object arg, JexlInfo 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

@Deprecated
Constructor<?> getConstructor(Object ctorHandle,
                                         Object[] args,
                                         JexlInfo info)
Deprecated. 

Returns a class constructor.

Parameters:
ctorHandle - a class or class name
args - constructor arguments
info - contextual information
Returns:
a Constructor

getConstructorMethod

JexlMethod getConstructorMethod(Object ctorHandle,
                                Object[] args,
                                JexlInfo info)
Returns a class constructor wrapped in a JexlMethod.

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

getMethod

JexlMethod getMethod(Object obj,
                     String method,
                     Object[] args,
                     JexlInfo 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 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 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 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.