org.apache.commons.jexl.util.introspection

Interface Uberspect

public interface Uberspect

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

Since: 1.0

Version: $Id: Uberspect.java 398498 2006-05-01 01:48:57Z dion $

Method Summary
IteratorgetIterator(Object obj, Info info)
To support iteratives - #foreach().
VelMethodgetMethod(Object obj, String method, Object[] args, Info info)
Returns a general method, corresponding to $foo.bar( $woogie ).
VelPropertyGetgetPropertyGet(Object obj, String identifier, Info info)
Property getter - returns VelPropertyGet appropos for #set($foo = $bar.woogie).
VelPropertySetgetPropertySet(Object obj, String identifier, Object arg, Info info)
Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir").
voidinit()
Initializer - will be called before use.

Method Detail

getIterator

public Iterator getIterator(Object obj, Info info)
To support iteratives - #foreach().

Parameters: info template info. obj to get the iterator for.

Returns: an iterator over obj.

Throws: Exception on any error.

getMethod

public VelMethod getMethod(Object obj, String method, Object[] args, Info info)
Returns a general method, corresponding to $foo.bar( $woogie ).

Parameters: obj the object method the method name args method arguments info template info

Returns: a VelMethod.

Throws: Exception on any error.

getPropertyGet

public VelPropertyGet getPropertyGet(Object obj, String identifier, Info info)
Property getter - returns VelPropertyGet appropos for #set($foo = $bar.woogie).

Parameters: obj the object to get the property from. identifier property name info template info

Returns: a VelPropertyGet.

Throws: Exception on any error.

getPropertySet

public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info)
Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir").

Parameters: obj the object to get the property from. identifier property name arg value to set. info template info

Returns: a VelPropertySet.

Throws: Exception on any error.

init

public void init()
Initializer - will be called before use.

Throws: Exception on any error.

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