|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.javelot.functionalj.Function
info.javelot.functionalj.ReflectionFunction
info.javelot.functionalj.MethodFunction
info.javelot.functionalj.InstanceFunction
Represents a function that targets an instance method. See MethodFunction
for information on how method names are matched.
| Field Summary |
| Fields inherited from class info.javelot.functionalj.Function |
m_class, m_name, m_object, m_parameters, m_targets |
| Constructor Summary | |
InstanceFunction(Class p_class,
String p_name)
Creates a function that targets the instance methods of the given class which match the given name. |
|
InstanceFunction(Class p_class,
String p_name,
Object p_object)
Creates a function that targets the instance methods of the given class which match the given name, to be invoked on the given object. |
|
InstanceFunction(Class p_class,
String p_name,
Object[] p_parameters)
Creates a function that targets the instance methods of the given class which match the given name, with the given parameters. |
|
InstanceFunction(Class p_class,
String p_name,
Object p_object,
Object[] p_parameters)
Creates a function that targets the instance methods of the given class which match the given name, to be invoked on the given object, with the supplied parameters; this is the constructor that is ultimately called by all other constructors. |
|
InstanceFunction(Object p_object,
String p_name)
Convenience constructor that accepts the given object on which to invoke the method of the specified name, determining the target class from the target object and using the InstanceFunction(Class,String,Object)
constructor. |
|
InstanceFunction(Object p_object,
String p_name,
Object[] p_parameters)
Convenience constructor that accepts the given object on which to invoke the method of the specified name, with the supplied parameters, determining the target class from the target object and using the InstanceFunction(Class,String,Object,Object[]) constructor. |
|
| Method Summary | |
boolean |
isObjectRequired()
Returns true since an object is required to invoke the method. |
protected Function |
newInstance(Class p_class,
Object[] p_parameters)
Creates a new InstanceFunction object using the specified target
class and parameters, and using the object on which to invoke the target, if
one was previously supplied. |
Function |
object(Object p_object)
Supplies the object on which to invoke the method, and returns a new InstanceFunction which includes this object. |
| Methods inherited from class info.javelot.functionalj.MethodFunction |
getAllTargets, getInsertIndex, getParameterTypes, invoke |
| Methods inherited from class info.javelot.functionalj.ReflectionFunction |
call |
| Methods inherited from class info.javelot.functionalj.Function |
addParameter, addParameters, addParameters, addParameters, addParameters, addParameters, getName, getObject, getParameters, getTargetClass, getTargets, isObjectPresent, objectOrParameter, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public InstanceFunction(Class p_class,
String p_name)
InstanceFunction(Class,String,Object,Object[]) for more details.
InstanceFunction(Class,String,Object,Object[])
public InstanceFunction(Class p_class,
String p_name,
Object p_object)
throws FunctionException
InstanceFunction(Class,String,Object,Object[]) for more details.
InstanceFunction(Class,String,Object,Object[])
public InstanceFunction(Class p_class,
String p_name,
Object[] p_parameters)
InstanceFunction(Class,String,Object,Object[]) for more details.
InstanceFunction(Class,String,Object,Object[])
public InstanceFunction(Class p_class,
String p_name,
Object p_object,
Object[] p_parameters)
p_class - the class of the target.p_name - the name to match, either exactly or by interpreting the name as
a property and matching on the corresponding getter and setter methods.p_object - the object on which to invoke the method.p_parameters - the parameters to be supplied to the method.
FunctionException - thrown if no methods of the target class match
the given name.
public InstanceFunction(Object p_object,
String p_name)
InstanceFunction(Class,String,Object)
constructor.
Thanks to Jean Safar for suggesting this.
InstanceFunction(Class,String,Object).
public InstanceFunction(Object p_object,
String p_name,
Object[] p_parameters)
InstanceFunction(Class,String,Object,Object[]) constructor.
Thanks to Jean Safar for suggesting this.
InstanceFunction(Class,String,Object,Object[]).| Method Detail |
public boolean isObjectRequired()
true since an object is required to invoke the method.
isObjectRequired in class Functiontrue.
protected Function newInstance(Class p_class,
Object[] p_parameters)
InstanceFunction object using the specified target
class and parameters, and using the object on which to invoke the target, if
one was previously supplied.
newInstance in class Functionp_class - the class of the target.p_parameters - the supplied parameters.
InstanceFunction object of the target class,
containing the supplied parameters.
public Function object(Object p_object)
throws FunctionException
InstanceFunction which includes this object.
object in class Functionp_object - the object on which to invoke the method.
InstanceFunction which includes the supplied object
on which to invoke the method.
FunctionException - thrown if another object was already previously
supplied, or if the class of supplied object is not compatible with the class
of the target of the function.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||