Package org.spongepowered.configurate
Interface ConfigurationVisitor.Safe<S,T>
-
- Type Parameters:
S
- state typeT
- terminal value type
- All Superinterfaces:
ConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Enclosing interface:
- ConfigurationVisitor<S,T,E extends Exception>
public static interface ConfigurationVisitor.Safe<S,T> extends ConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
A subinterface for visitors that do not throw any checked exceptions during their execution.- Since:
- 4.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.configurate.ConfigurationVisitor
ConfigurationVisitor.Safe<S,T>, ConfigurationVisitor.Stateless<E extends Exception>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
beginVisit(ConfigurationNode node, S state)
Called at the beginning of the visit with a state object created.T
endVisit(S state)
Called after every node has been visited, to allow for cleanup and validation.void
enterListNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for list nodes.void
enterMappingNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for mapping nodes.void
enterNode(ConfigurationNode node, S state)
Called once per node, for every node.void
enterScalarNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for scalar nodes.void
exitListNode(ConfigurationNode node, S state)
Called for a list node after the node and any of its children have been visited.void
exitMappingNode(ConfigurationNode node, S state)
Called for a list node after the node and any of its children have been visited.S
newState()
Called to provide a state object if a visit is initiated without one already existing.
-
-
-
Method Detail
-
newState
S newState()
Description copied from interface:ConfigurationVisitor
Called to provide a state object if a visit is initiated without one already existing.- Specified by:
newState
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Returns:
- a new state object to be passed through the rest of this visit
-
beginVisit
void beginVisit(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called at the beginning of the visit with a state object created.- Specified by:
beginVisit
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- the root nodestate
- the state
-
enterNode
void enterNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called once per node, for every node.- Specified by:
enterNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- the current nodestate
- provided state
-
enterMappingNode
void enterMappingNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for mapping nodes.- Specified by:
enterMappingNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- current nodestate
- provided state
-
enterListNode
void enterListNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for list nodes.- Specified by:
enterListNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- current nodestate
- provided state
-
enterScalarNode
void enterScalarNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for scalar nodes.- Specified by:
enterScalarNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- current nodestate
- provided state
-
exitMappingNode
void exitMappingNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called for a list node after the node and any of its children have been visited.- Specified by:
exitMappingNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- the node that has been visitedstate
- provided state
-
exitListNode
void exitListNode(ConfigurationNode node, S state)
Description copied from interface:ConfigurationVisitor
Called for a list node after the node and any of its children have been visited.- Specified by:
exitListNode
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
node
- the node that has been visitedstate
- provided state
-
endVisit
T endVisit(S state)
Description copied from interface:ConfigurationVisitor
Called after every node has been visited, to allow for cleanup and validation.- Specified by:
endVisit
in interfaceConfigurationVisitor<S,T,org.spongepowered.configurate.VisitorSafeNoopException>
- Parameters:
state
- provided state- Returns:
- a terminal value
-
-