public class InvokableIteratorMethod extends InvokableMethod
The result is collected into a OutputCollector
as specified by the OperationMethod
annotation.
This proxy is used (instead of the default InvokableMethod
) when an operation is defining an output collector
in the OperationMethod
annotation so that iterable inputs are automatically handled by the chain executor.
This specialized implementation is declaring the same consume type as its non-iterable counterpart. But at runtime it consumes any Iterable of the cosume type.
To correctly generate the operation documentation the OperationTypeImpl
is checking if the method is iterable
or not through isIterable()
to declare the correct consume type.
ADAPTABLE_PRIORITY, EXACT_MATCH_PRIORITY, ISTANCE_OF_PRIORITY, USER_PRIORITY, VOID_PRIORITY
Constructor and Description |
---|
InvokableIteratorMethod(OperationType op,
Method method,
OperationMethod anno) |
Modifier and Type | Method and Description |
---|---|
int |
inputMatch(Class<?> in)
Return 0 for no match.
|
boolean |
isIterable() |
compareTo, getConsume, getInputType, getMethod, getOperation, getOutputType, getPriority, getProduce, invoke, toString
public InvokableIteratorMethod(OperationType op, Method method, OperationMethod anno)
public boolean isIterable()
isIterable
in class InvokableMethod
public int inputMatch(Class<?> in)
InvokableMethod
inputMatch
in class InvokableMethod
Copyright © 2015 Nuxeo SA. All rights reserved.