| java.lang.Object org.mandarax.kernel.LObject org.mandarax.kernel.meta.JConstructor org.mandarax.kernel.meta.DynaBeanFunction
DynaBeanFunction | final public class DynaBeanFunction extends JConstructor implements Function(Code) | | An implementation of function similar to JFunction. The difference is that a DynaBeanFunction
works only with methods with one parameter, and these parameter is a string. The value
of this string is fixed (propertyName). This is to support "dynamic beans" that keep the state in
a map or a similar structure (and does not use instance variables for this purpose).
The get methods to retrieve the properties by name (e.g., get() in java.util.Map) can then be wrapped
as functions using this class.
author: Jens Dietrich version: 3.4 <7 March 05> since: 2.2.1 |
DynaBeanFunction | public DynaBeanFunction()(Code) | | Constructor.
Parameters: aMethod - the method used |
DynaBeanFunction | public DynaBeanFunction(Method aMethod, String propertyName)(Code) | | Constructor.
Parameters: aMethod - the method usedparam propertyName the name of the property |
DynaBeanFunction | public DynaBeanFunction(Method aMethod, String propertyName, String aName)(Code) | | Constructor.
Parameters: aMethod - the method used Parameters: propertyName - the name of the property Parameters: aName - the name of the object |
equals | public boolean equals(Object obj)(Code) | | Indicates whether this function equals the object.
Parameters: obj - the object to compare this object with true if the objects are equal, false otherwise |
getPropertyName | public String getPropertyName()(Code) | | Returns the propertyName.
String |
getReturnType | public Class getReturnType()(Code) | | Get the return type.
the return type |
getStructure | public java.lang.Class[] getStructure()(Code) | | Get the structure, i.e. the parameter types.
The first element is the declaring class of the method!
the structure of this object |
setMethod | public void setMethod(Method m)(Code) | | Set the method.
Parameters: m - a method |
setPropertyName | public void setPropertyName(String propertyName)(Code) | | Sets the propertyName.
Parameters: propertyName - The propertyName to set |
|
|