Package org.jline.reader
Enum Parser.ParseContext
- java.lang.Object
-
- java.lang.Enum<Parser.ParseContext>
-
- org.jline.reader.Parser.ParseContext
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Parser.ParseContext>
- Enclosing interface:
- Parser
public static enum Parser.ParseContext extends java.lang.Enum<Parser.ParseContext>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCEPT_LINE
Try a real "final" parse.COMPLETE
Parse to find completions (typically after a Tab).SECONDARY_PROMPT
Called when we need to update the secondary prompts.SPLIT_LINE
Parsed words will have all characters present in input line including quotes and escape chars.UNSPECIFIED
-
Constructor Summary
Constructors Modifier Constructor Description private
ParseContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Parser.ParseContext
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Parser.ParseContext[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSPECIFIED
public static final Parser.ParseContext UNSPECIFIED
-
ACCEPT_LINE
public static final Parser.ParseContext ACCEPT_LINE
Try a real "final" parse. May throw EOFError in which case we have incomplete input.
-
SPLIT_LINE
public static final Parser.ParseContext SPLIT_LINE
Parsed words will have all characters present in input line including quotes and escape chars. We should tolerate and ignore errors.
-
COMPLETE
public static final Parser.ParseContext COMPLETE
Parse to find completions (typically after a Tab). We should tolerate and ignore errors.
-
SECONDARY_PROMPT
public static final Parser.ParseContext SECONDARY_PROMPT
Called when we need to update the secondary prompts. Specifically, when we need the 'missing' field from EOFError, which is used by a "%M" in a prompt pattern.
-
-
Method Detail
-
values
public static Parser.ParseContext[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Parser.ParseContext c : Parser.ParseContext.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Parser.ParseContext valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-