|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.CommandInvoker<Object,Object>
org.crsh.lang.groovy.closure.ClosureInvoker
public class ClosureInvoker
| Field Summary | |
|---|---|
private groovy.lang.Closure |
closure
. |
private CommandContext<? super Object> |
consumer
. |
private Class<?> |
type
. |
| Constructor Summary | |
|---|---|
ClosureInvoker(groovy.lang.Closure closure)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the producer. |
void |
flush()
|
Class<Object> |
getConsumedType()
Returns the class of the element generic type. |
Class<Object> |
getProducedType()
Returns the class of the produced type. |
void |
open(CommandContext<? super Object> consumer)
Open the producer with the specified consumer. |
void |
provide(Object element)
Provide an element. |
| Methods inherited from class org.crsh.command.CommandInvoker |
|---|
invoke |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final groovy.lang.Closure closure
private final Class<?> type
private CommandContext<? super Object> consumer
| Constructor Detail |
|---|
public ClosureInvoker(groovy.lang.Closure closure)
| Method Detail |
|---|
public Class<Object> getProducedType()
Producer
public Class<Object> getConsumedType()
Consumer
public void provide(Object element)
throws IOException
Consumer
element - the provided element
IOExceptionpublic void open(CommandContext<? super Object> consumer)
Producer
consumer - the consumer
public void flush()
throws IOException
IOExceptionpublic void close()
Producer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||