Package com.aspectran.shell.command
Class OutputRedirection
- java.lang.Object
-
- com.aspectran.shell.command.OutputRedirection
-
public class OutputRedirection extends java.lang.Object
Created: 2017. 3. 8.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OutputRedirection.MultiWriter
The writer that handles multiple writers.static class
OutputRedirection.Operator
Output redirection operators.
-
Constructor Summary
Constructors Constructor Description OutputRedirection(OutputRedirection.Operator operator)
-
Method Summary
Modifier and Type Method Description static java.io.PrintWriter
determineOutputWriter(java.util.List<OutputRedirection> redirectionList, Console console)
Returns theWriter
instances for translet output redirection.boolean
equals(java.lang.Object o)
java.lang.String
getOperand()
OutputRedirection.Operator
getOperator()
int
hashCode()
static java.lang.String
serialize(java.util.Collection<OutputRedirection> redirectionList)
void
setOperand(java.lang.String operand)
java.lang.String
toString()
-
-
-
Constructor Detail
-
OutputRedirection
public OutputRedirection(OutputRedirection.Operator operator)
-
-
Method Detail
-
getOperand
public java.lang.String getOperand()
-
setOperand
public void setOperand(java.lang.String operand)
-
getOperator
public OutputRedirection.Operator getOperator()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
serialize
public static java.lang.String serialize(java.util.Collection<OutputRedirection> redirectionList)
-
determineOutputWriter
public static java.io.PrintWriter determineOutputWriter(java.util.List<OutputRedirection> redirectionList, Console console) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
Returns theWriter
instances for translet output redirection.- Parameters:
redirectionList
- a list of the output redirectionconsole
- the Console instance- Returns:
- the
Writer
instance - Throws:
java.io.FileNotFoundException
- if the file has an invalid pathjava.io.UnsupportedEncodingException
- if the named encoding is not supported
-
-