|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.op4j.functions.Function<T,R> org.op4j.functions.Call<T,R>
public final class Call<T,R>
Function hub class for executing methods of target objects.
Method Summary | ||
---|---|---|
static
|
arrayOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Abbreviation for { methodForArrayOf(Type, String, Object...) . |
|
static Function<Object,String[]> |
arrayOfString(String methodName,
Object... optionalParameters)
Abbreviation for { methodForArrayOfString(String, Object...) . |
|
static Function<Object,Byte> |
b(String methodName,
Object... optionalParameters)
Abbreviation for { methodForByte(String, Object...) . |
|
static Function<Object,BigDecimal> |
bigDecimal(String methodName,
Object... optionalParameters)
Abbreviation for { methodForBigDecimal(String, Object...) . |
|
static Function<Object,BigInteger> |
bigInteger(String methodName,
Object... optionalParameters)
Abbreviation for { methodForBigInteger(String, Object...) . |
|
static Function<Object,Boolean> |
bool(String methodName,
Object... optionalParameters)
Abbreviation for { methodForBoolean(String, Object...) . |
|
static Function<Object,Character> |
c(String methodName,
Object... optionalParameters)
Abbreviation for { methodForCharacter(String, Object...) . |
|
static Function<Object,Calendar> |
calendar(String methodName,
Object... optionalParameters)
Abbreviation for { methodForCalendar(String, Object...) . |
|
static Function<Object,Double> |
d(String methodName,
Object... optionalParameters)
Abbreviation for { methodForDouble(String, Object...) . |
|
static Function<Object,Date> |
date(String methodName,
Object... optionalParameters)
Abbreviation for { methodForDate(String, Object...) . |
|
R |
execute(T input,
ExecCtx ctx)
Executes the function on the current target object, which is passed as the input parameter. |
|
static Function<Object,Float> |
f(String methodName,
Object... optionalParameters)
Abbreviation for { methodForFloat(String, Object...) . |
|
static Function<Object,Integer> |
i(String methodName,
Object... optionalParameters)
Abbreviation for { methodForInteger(String, Object...) . |
|
static Function<Object,Long> |
l(String methodName,
Object... optionalParameters)
Abbreviation for { methodForLong(String, Object...) . |
|
static
|
listOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Abbreviation for { methodForListOf(Type, String, Object...) . |
|
static Function<Object,List<String>> |
listOfString(String methodName,
Object... optionalParameters)
Abbreviation for { methodForListOfString(String, Object...) . |
|
static
|
methodFor(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Executes a method on the target object which returns an object of the resultType. |
|
static
|
methodForArrayOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Executes a method on the target object which returns R[], being R the specified type parameter. |
|
static Function<Object,String[]> |
methodForArrayOfString(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns String[]. |
|
static Function<Object,BigDecimal> |
methodForBigDecimal(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns BigDecimal. |
|
static Function<Object,BigInteger> |
methodForBigInteger(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns BigInteger. |
|
static Function<Object,Boolean> |
methodForBoolean(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Boolean. |
|
static Function<Object,Byte> |
methodForByte(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Byte. |
|
static Function<Object,Calendar> |
methodForCalendar(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Calendar. |
|
static Function<Object,Character> |
methodForCharacter(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Character. |
|
static Function<Object,Date> |
methodForDate(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Date. |
|
static Function<Object,Double> |
methodForDouble(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Double. |
|
static Function<Object,Float> |
methodForFloat(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Float. |
|
static Function<Object,Integer> |
methodForInteger(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Integer. |
|
static
|
methodForListOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Executes a method on the target object which returns List<R>, being R the specified type parameter. |
|
static Function<Object,List<String>> |
methodForListOfString(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns List<String>. |
|
static Function<Object,Long> |
methodForLong(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Long. |
|
static Function<Object,Object> |
methodForObject(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Object. |
|
static
|
methodForSetOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Set<R>, being R the specified type parameter. |
|
static Function<Object,Set<String>> |
methodForSetOfString(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Set<String>. |
|
static Function<Object,Short> |
methodForShort(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns Short. |
|
static Function<Object,String> |
methodForString(String methodName,
Object... optionalParameters)
Executes a method on the target object which returns String. |
|
static Function<Object,Object> |
obj(String methodName,
Object... optionalParameters)
Abbreviation for { methodForObject(String, Object...) . |
|
static
|
obj(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Abbreviation for { methodFor(Type, String, Object...) . |
|
static Function<Object,String> |
s(String methodName,
Object... optionalParameters)
Abbreviation for { methodForString(String, Object...) . |
|
static
|
setOf(org.javaruntype.type.Type<R> resultType,
String methodName,
Object... optionalParameters)
Abbreviation for { methodForSetOf(Type, String, Object...) . |
|
static Function<Object,Set<String>> |
setOfString(String methodName,
Object... optionalParameters)
Abbreviation for { methodForSetOfString(String, Object...) . |
|
static Function<Object,Short> |
shr(String methodName,
Object... optionalParameters)
Abbreviation for { methodForShort(String, Object...) . |
Methods inherited from class org.op4j.functions.Function |
---|
execute |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Function<Object,Object> methodForObject(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Object. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Object> obj(String methodName, Object... optionalParameters)
Abbreviation for {methodForObject(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,R> methodFor(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Executes a method on the target object which returns an object of the resultType. Parameters must match those of the method.
resultType
- the type of the resultmethodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,R> obj(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Abbreviation for {methodFor(Type, String, Object...)
.
resultType
- the type of the resultmethodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,BigInteger> methodForBigInteger(String methodName, Object... optionalParameters)
Executes a method on the target object which returns BigInteger. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,BigInteger> bigInteger(String methodName, Object... optionalParameters)
Abbreviation for {methodForBigInteger(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,BigDecimal> methodForBigDecimal(String methodName, Object... optionalParameters)
Executes a method on the target object which returns BigDecimal. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,BigDecimal> bigDecimal(String methodName, Object... optionalParameters)
Abbreviation for {methodForBigDecimal(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Boolean> methodForBoolean(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Boolean. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Boolean> bool(String methodName, Object... optionalParameters)
Abbreviation for {methodForBoolean(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Byte> methodForByte(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Byte. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Byte> b(String methodName, Object... optionalParameters)
Abbreviation for {methodForByte(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Character> methodForCharacter(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Character. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Character> c(String methodName, Object... optionalParameters)
Abbreviation for {methodForCharacter(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Calendar> methodForCalendar(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Calendar. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Calendar> calendar(String methodName, Object... optionalParameters)
Abbreviation for {methodForCalendar(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Date> methodForDate(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Date. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Date> date(String methodName, Object... optionalParameters)
Abbreviation for {methodForDate(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Double> methodForDouble(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Double. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Double> d(String methodName, Object... optionalParameters)
Abbreviation for {methodForDouble(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Float> methodForFloat(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Float. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Float> f(String methodName, Object... optionalParameters)
Abbreviation for {methodForFloat(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Integer> methodForInteger(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Integer. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Integer> i(String methodName, Object... optionalParameters)
Abbreviation for {methodForInteger(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Long> methodForLong(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Long. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Long> l(String methodName, Object... optionalParameters)
Abbreviation for {methodForLong(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Short> methodForShort(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Short. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Short> shr(String methodName, Object... optionalParameters)
Abbreviation for {methodForShort(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,String> methodForString(String methodName, Object... optionalParameters)
Executes a method on the target object which returns String. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,String> s(String methodName, Object... optionalParameters)
Abbreviation for {methodForString(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,List<String>> methodForListOfString(String methodName, Object... optionalParameters)
Executes a method on the target object which returns List<String>. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,List<String>> listOfString(String methodName, Object... optionalParameters)
Abbreviation for {methodForListOfString(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Set<String>> methodForSetOfString(String methodName, Object... optionalParameters)
Executes a method on the target object which returns Set<String>. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,Set<String>> setOfString(String methodName, Object... optionalParameters)
Abbreviation for {methodForSetOfString(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,String[]> methodForArrayOfString(String methodName, Object... optionalParameters)
Executes a method on the target object which returns String[]. Parameters must match those of the method.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static Function<Object,String[]> arrayOfString(String methodName, Object... optionalParameters)
Abbreviation for {methodForArrayOfString(String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,List<R>> methodForListOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Executes a method on the target object which returns List<R>, being R the specified type parameter. Parameters must match those of the method.
resultType
- the type of the method's resultmethodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,List<R>> listOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Abbreviation for {methodForListOf(Type, String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,Set<R>> methodForSetOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Executes a method on the target object which returns Set<R>, being R the specified type parameter. Parameters must match those of the method.
resultType
- the type of the method's resultmethodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,Set<R>> setOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Abbreviation for {methodForSetOf(Type, String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,R[]> methodForArrayOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Executes a method on the target object which returns R[], being R the specified type parameter. Parameters must match those of the method.
resultType
- the type of the method's resultmethodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public static <R> Function<Object,R[]> arrayOf(org.javaruntype.type.Type<R> resultType, String methodName, Object... optionalParameters)
Abbreviation for {methodForArrayOf(Type, String, Object...)
.
methodName
- the name of the methodoptionalParameters
- the (optional) parameters of the method.
public R execute(T input, ExecCtx ctx) throws Exception
IFunction
Executes the function on the current target object, which is passed
as the input parameter. The ExecCtx
parameter
provides some metadata related to the execution, like the index in
an iteration.
The execution of a function can throw any exception.
If you intend to call the execute method directly on any of
your functions (outside an op4j expression), you might prefer using
Function.execute(Object)
instead.
input
- the target object on which the function is to be executedctx
- the context (metadata) for the function execution
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |