|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.InnerInvocationContext<P>
class InnerInvocationContext<P>
| Field Summary | |
|---|---|
(package private) InvocationContext<?,?> |
outter
. |
(package private) boolean |
piped
. |
(package private) Class<? extends P> |
producedType
. |
(package private) List<P> |
products
. |
| Constructor Summary | |
|---|---|
InnerInvocationContext(InvocationContext<?,?> outter,
Class<? extends P> producedType,
boolean piped)
|
|
| Method Summary | |
|---|---|
Iterable<Void> |
consume()
Returns an iterator over the stream of consumed items. |
Map<String,Object> |
getAttributes()
Returns the attributes related to current shell session. |
String |
getProperty(String propertyName)
Returns a generic property. |
int |
getWidth()
Returns the term width in chars. |
PrintWriter |
getWriter()
Returns the writer for the output. |
boolean |
isPiped()
Returns true if the command is involved in a pipe operation and receives a stream. |
void |
produce(P product)
Produce an item. |
String |
readLine(String msg,
boolean echo)
Display a message and read a line on the console. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final InvocationContext<?,?> outter
final Class<? extends P> producedType
List<P> products
final boolean piped
| Constructor Detail |
|---|
InnerInvocationContext(InvocationContext<?,?> outter,
Class<? extends P> producedType,
boolean piped)
| Method Detail |
|---|
public int getWidth()
InvocationContext
getWidth in interface InvocationContext<Void,P>public String getProperty(String propertyName)
InvocationContext
getProperty in interface InvocationContext<Void,P>propertyName - the property name
public String readLine(String msg,
boolean echo)
InvocationContext
readLine in interface InvocationContext<Void,P>msg - the message to display before reading a lineecho - wether or not the line read should be echoed when typing
public PrintWriter getWriter()
InvocationContext
getWriter in interface InvocationContext<Void,P>public boolean isPiped()
InvocationContext
isPiped in interface InvocationContext<Void,P>
public Iterable<Void> consume()
throws IllegalStateException
InvocationContext
consume in interface InvocationContext<Void,P>IllegalStateException - if the command is not involved in a pipe operationpublic void produce(P product)
InvocationContext
produce in interface InvocationContext<Void,P>product - the item productpublic Map<String,Object> getAttributes()
CommandContext
getAttributes in interface CommandContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||