Top Description Inners Fields Constructors Methods
org.springframework.beans.factory.parsing

public final Class ParseState

extends Object
Class Inheritance
Imports
java.util.ArrayDeque, org.springframework.lang.Nullable

Simple ArrayDeque-based structure for tracking the logical position during a parsing process. entries are 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.

Authors
Rob Harrop, Juergen Hoeller
Since
2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ParseState.Entry

Marker interface for entries into the ParseState.

Field Summary

Modifier and TypeField and Description
private final ArrayDeque<ParseState.Entry>
state

Internal ArrayDeque storage.

Constructor Summary

AccessConstructor and Description
public
ParseState()

Create a new ParseState with an empty ArrayDeque.

private
ParseState(ParseState other)

Create a new ParseState whose ArrayDeque is a clone of the state in the passed-in ParseState.

Method Summary

Modifier and TypeMethod and Description
public ParseState.Entry
peek()

Return the Entry currently at the top of the ArrayDeque or null if the ArrayDeque is empty.

public void
pop()

Remove an Entry from the ArrayDeque.

public void
push(ParseState.Entry entry)

Add a new Entry to the ArrayDeque.

public ParseState
snapshot()

Create a new instance of ParseState which is an independent snapshot of this instance.

public String
toString()

Overrides java.lang.Object.toString.

Returns a tree-style representation of the current ParseState.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

stateback to summary
private final ArrayDeque<ParseState.Entry> state

Internal ArrayDeque storage.

Constructor Detail

ParseStateback to summary
public ParseState()

Create a new ParseState with an empty ArrayDeque.

ParseStateback to summary
private ParseState(ParseState other)

Create a new ParseState whose ArrayDeque is a clone of the state in the passed-in ParseState.

Method Detail

peekback to summary
public ParseState.Entry peek()

Return the Entry currently at the top of the ArrayDeque or null if the ArrayDeque is empty.

Annotations
@Nullable
popback to summary
public void pop()

Remove an Entry from the ArrayDeque.

pushback to summary
public void push(ParseState.Entry entry)

Add a new Entry to the ArrayDeque.

snapshotback to summary
public ParseState snapshot()

Create a new instance of ParseState which is an independent snapshot of this instance.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a tree-style representation of the current ParseState.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override
org.springframework.beans.factory.parsing back to summary

public Interface ParseState.Entry

Known Direct Implementers
org.springframework.beans.factory.parsing.PropertyEntry, org.springframework.beans.factory.parsing.QualifierEntry, org.springframework.beans.factory.parsing.BeanEntry, org.springframework.beans.factory.parsing.ConstructorArgumentEntry

Marker interface for entries into the ParseState.