Package core
Class TokenizerResult
java.lang.Object
core.TokenizerResult
Holds the result of tokenizing a shell input string, including tokens and pipeline parts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanTrue if the output redirection is in append mode ('>>').booleanTrue if the input contains a pipeline ('|').booleanTrue if the input contains standard output redirection ('>' or '>>').booleanTrue if the error redirection is in append mode ('2>>').booleanTrue if the input contains standard error redirection ('2>' or '2>>').The list of TokenizerResult objects for each part of a pipeline, or null if not a pipeline.The target file for standard output redirection (e.g., after '>' or '>>'), or null if not present.The target file for standard error redirection (e.g., after '2>' or '2>>'), or null if not present.The list of tokens parsed from the input string. -
Constructor Summary
ConstructorsConstructorDescriptionTokenizerResult(List<String> tokens) Constructs a TokenizerResult with the given tokens. -
Method Summary
-
Field Details
-
tokens
The list of tokens parsed from the input string. -
redirectTarget
The target file for standard output redirection (e.g., after '>' or '>>'), or null if not present. -
stderrRedirectTarget
The target file for standard error redirection (e.g., after '2>' or '2>>'), or null if not present. -
isRedirect
public boolean isRedirectTrue if the input contains standard output redirection ('>' or '>>'). -
isStderrRedirect
public boolean isStderrRedirectTrue if the input contains standard error redirection ('2>' or '2>>'). -
isAppend
public boolean isAppendTrue if the output redirection is in append mode ('>>'). -
isStderrAppend
public boolean isStderrAppendTrue if the error redirection is in append mode ('2>>'). -
isPipeline
public boolean isPipelineTrue if the input contains a pipeline ('|'). -
pipelineParts
The list of TokenizerResult objects for each part of a pipeline, or null if not a pipeline.
-
-
Constructor Details
-
TokenizerResult
Constructs a TokenizerResult with the given tokens.- Parameters:
tokens- The list of tokens.
-