All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.webmacro.util.PropertyMethod

java.lang.Object
   |
   +----org.webmacro.util.PropertyMethod

public final class PropertyMethod
extends Object
A property method can function as part of a name in a property, and represents a method call that should be used to resolve that portion of the name.

For example: a.b.get("C").d is equivalent to a.b.hi.d, you can also use this to access methods which are not normally available through the regular introspection algorithms, for example: #set $thing = a.get("thing")

The arguments supplied to a PropertyMethod can be a list including PropertyReference objects which need to be resolved against a context. The introspection process will supply the context and resolve these references at execution time.


Constructor Index

 o PropertyMethod(String, Object[])
Create a new PropertyMethod
 o PropertyMethod(String, PropertyReference)
Create a new PropertyMethod

Method Index

 o getArguments(Object)
Return the arguments for this method, after resolving them against the supplied context.
 o getName()
Return the name of this PropertyMethod
 o toString()
Return a signature of this method

Constructors

 o PropertyMethod
 public PropertyMethod(String name,
                       Object args[])
Create a new PropertyMethod

Parameters:
name - the name of the method to call
args - the arguments, including PropertyReference objects
 o PropertyMethod
 public PropertyMethod(String name,
                       PropertyReference args)
Create a new PropertyMethod

Parameters:
name - the name of the method to call
args - the arguments, including PropertyReference objects

Methods

 o getName
 public final String getName()
Return the name of this PropertyMethod

 o toString
 public final String toString()
Return a signature of this method

Overrides:
toString in class Object
 o getArguments
 public final Object[] getArguments(Object context) throws InvalidContextException
Return the arguments for this method, after resolving them against the supplied context. Any arguments which are of type PropertyReference will be resolved into a regular object via the PropertyReference.evaluate method.

Throws: InvalidContextException
a PropertyReference in the arguments failed to resolve against the supplied context

All Packages  Class Hierarchy  This Package  Previous  Next  Index