Package org.mapstruct.ap.internal.writer
Enum IndentationCorrectingWriter.State
- java.lang.Object
-
- java.lang.Enum<IndentationCorrectingWriter.State>
-
- org.mapstruct.ap.internal.writer.IndentationCorrectingWriter.State
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<IndentationCorrectingWriter.State>
- Enclosing class:
- IndentationCorrectingWriter
private static enum IndentationCorrectingWriter.State extends java.lang.Enum<IndentationCorrectingWriter.State>
A state of parsing a given character buffer.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AFTER_LINE_BREAKDirectly after a line-break, or within leading whitespace following to a line-break.IN_LINE_BREAKBetween \r and \n of a Windows line-break.IN_STRINGIn a String definition, Between un-escaped quotes " "IN_STRING_ESCAPED_CHARIn a String, character following an escape character '\', should be ignored, can also be '"' that should be ignored.IN_TEXTWithin any text, but after a String (" ").START_OF_LINEWithin any text, before encountering a String definition.
-
Constructor Summary
Constructors Modifier Constructor Description privateState()
-
Method Summary
-
-
-
Enum Constant Detail
-
START_OF_LINE
public static final IndentationCorrectingWriter.State START_OF_LINE
Within any text, before encountering a String definition.
-
IN_TEXT
public static final IndentationCorrectingWriter.State IN_TEXT
Within any text, but after a String (" ").
-
IN_STRING
public static final IndentationCorrectingWriter.State IN_STRING
In a String definition, Between un-escaped quotes " "
-
IN_STRING_ESCAPED_CHAR
public static final IndentationCorrectingWriter.State IN_STRING_ESCAPED_CHAR
In a String, character following an escape character '\', should be ignored, can also be '"' that should be ignored.
-
IN_LINE_BREAK
public static final IndentationCorrectingWriter.State IN_LINE_BREAK
Between \r and \n of a Windows line-break.
-
AFTER_LINE_BREAK
public static final IndentationCorrectingWriter.State AFTER_LINE_BREAK
Directly after a line-break, or within leading whitespace following to a line-break.
-
-
Method Detail
-
values
public static IndentationCorrectingWriter.State[] 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 (IndentationCorrectingWriter.State c : IndentationCorrectingWriter.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndentationCorrectingWriter.State 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
-
handleCharacter
final IndentationCorrectingWriter.State handleCharacter(char c, IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
doHandleCharacter
abstract IndentationCorrectingWriter.State doHandleCharacter(char c, IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
onEntry
final void onEntry(IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
doOnEntry
void doOnEntry(IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
onExit
void onExit(IndentationCorrectingWriter.StateContext context, IndentationCorrectingWriter.State nextState) throws java.io.IOException
- Throws:
java.io.IOException
-
onBufferFinished
void onBufferFinished(IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
protected void flush(IndentationCorrectingWriter.StateContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
-