|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.javelot.functionalj.reflect.function.DynReflectFunction<R>
R - the type of the result returned by the function.public class DynReflectFunction<R>
Function to dynamically invoke a reflect element from a list of possible targets.
| Constructor Summary | |
|---|---|
DynReflectFunction(ReflectElement[] p_elements,
ReflectParameters p_rp)
Constructs a function to invoke one of the possible reflect elements. |
|
DynReflectFunction(ReflectElement[] p_elements,
ReflectParameters p_rp,
Object[] p_params)
Constructs a function to invoke one of the possible reflect elements, with some parameters already bound to the function. |
|
| Method Summary | |
|---|---|
FunctionN |
bind(int p_index,
Object p_param)
Binds, at the specified index, the given parameter of this function of N parameters to return a new function of (N-1) parameters. |
FunctionN |
bind(Object... p_params)
Binds the given M parameters of this function of N parameters to return a new function of (N-M) parameters. |
R |
call()
Calls the function and returns the result. |
R |
call(Object... p_params)
Calls the function and returns the result. |
Function0 |
f0()
Returns this function as a function of no parameters. |
Function1 |
f1()
Returns this function as a function of 1 parameter. |
Function2 |
f2()
Returns this function as a function of 2 parameters. |
Function3 |
f3()
Returns this function as a function of 3 parameters. |
Function4 |
f4()
Returns this function as a function of 4 parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynReflectFunction(ReflectElement[] p_elements,
ReflectParameters p_rp)
p_elements - the reflect elements.p_rp - the mechanism to determine elements that are compatible with
parameters.
public DynReflectFunction(ReflectElement[] p_elements,
ReflectParameters p_rp,
Object[] p_params)
p_elements - the reflect elements.p_rp - the mechanism to determine elements that are compatible with
parameters.p_params - the parameters that have been bound to the function.| Method Detail |
|---|
public R call(Object... p_params)
throws FunctionException
FunctionN
call in interface FunctionN<R>p_params - the parameters to the function.
FunctionException - thrown if an exception occurs during the function
call.
public R call()
throws FunctionException
FunctionN
call in interface FunctionN<R>FunctionException - thrown if an exception occurs during the function
call.
public FunctionN bind(Object... p_params)
throws FunctionException
FunctionN
bind in interface FunctionN<R>p_params - the M parameters to bind to the function.
FunctionException
public FunctionN bind(int p_index,
Object p_param)
FunctionN
bind in interface FunctionN<R>p_index - the index at which to bind the parameter.p_param - the parameter to bind to the function.
public Function0 f0()
throws FunctionException
FunctionN
f0 in interface FunctionN<R>FunctionException
public Function1 f1()
throws FunctionException
FunctionN
f1 in interface FunctionN<R>FunctionException
public Function2 f2()
throws FunctionException
FunctionN
f2 in interface FunctionN<R>FunctionException
public Function3 f3()
throws FunctionException
FunctionN
f3 in interface FunctionN<R>FunctionException
public Function4 f4()
throws FunctionException
FunctionN
f4 in interface FunctionN<R>FunctionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||