Class ParseState
- java.lang.Object
- org.springframework.beans.factory.parsing.ParseState
public final class ParseState extends Object
SimpleArrayDeque-based structure for tracking the logical position during a parsing process.entriesare added to the ArrayDeque at each point during the parse phase in a reader-specific manner.Calling
toString()will render a tree-style view of the current logical position in the parse phase. This representation is intended for use in error messages.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceParseState.EntryMarker interface for entries into theParseState.
Constructor Summary
Constructors Constructor Description ParseState()Create a newParseStatewith an emptyArrayDeque.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParseState.Entrypeek()Return theParseState.Entrycurrently at the top of theArrayDequeornullif theArrayDequeis empty.voidpop()Remove anParseState.Entryfrom theArrayDeque.voidpush(ParseState.Entry entry)Add a newParseState.Entryto theArrayDeque.ParseStatesnapshot()Create a new instance ofParseStatewhich is an independent snapshot of this instance.StringtoString()Returns a tree-style representation of the currentParseState.
Constructor Detail
ParseState
public ParseState()
Create a newParseStatewith an emptyArrayDeque.
Method Detail
push
public void push(ParseState.Entry entry)
Add a newParseState.Entryto theArrayDeque.
pop
public void pop()
Remove anParseState.Entryfrom theArrayDeque.
peek
@Nullable public ParseState.Entry peek()
Return theParseState.Entrycurrently at the top of theArrayDequeornullif theArrayDequeis empty.
snapshot
public ParseState snapshot()
Create a new instance ofParseStatewhich is an independent snapshot of this instance.