|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webmacro.util.PropertyMethod
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 Macro objects which need to be resolved against a context. The introspection process will supply the context and resolve these references at execution time.
Constructor Summary | |
PropertyMethod(java.lang.String name,
Macro args)
Create a new PropertyMethod |
|
PropertyMethod(java.lang.String name,
java.lang.Object[] args)
Create a new PropertyMethod |
Method Summary | |
java.lang.Object[] |
getArguments(Context context)
Return the arguments for this method, after resolving them against the supplied context. |
java.lang.String |
getName()
Return the name of this PropertyMethod |
java.lang.String |
toString()
Return a signature of this method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PropertyMethod(java.lang.String name, java.lang.Object[] args)
name
- the name of the method to callargs
- the arguments, including Macro objectspublic PropertyMethod(java.lang.String name, Macro args)
name
- the name of the method to callargs
- the arguments, including Macro objectsMethod Detail |
public final java.lang.String getName()
getName
in interface Named
public final java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.Object[] getArguments(Context context) throws PropertyException
PropertyException
- a Macro in the arguments failed to resolve against the supplied context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |