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
Modifier and TypeMethodDescriptionvoidbeginVisit(ConfigurationNode node, S state) Called at the beginning of the visit with a state object created.Called after every node has been visited, to allow for cleanup and validation.voidenterListNode(ConfigurationNode node, S state) Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.voidenterMappingNode(ConfigurationNode node, S state) Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.voidenterNode(ConfigurationNode node, S state) Called once per node, for every node.voidenterScalarNode(ConfigurationNode node, S state) Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.voidexitListNode(ConfigurationNode node, S state) Called for a list node after the node and any of its children have been visited.voidexitMappingNode(ConfigurationNode node, S state) Called for a list node after the node and any of its children have been visited.newState()Called to provide a state object if a visit is initiated without one already existing.
-
Method Details
-
newState
Description copied from interface:ConfigurationVisitorCalled to provide a state object if a visit is initiated without one already existing.- Specified by:
newStatein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Returns:
- a new state object to be passed through the rest of this visit
-
beginVisit
Description copied from interface:ConfigurationVisitorCalled at the beginning of the visit with a state object created.- Specified by:
beginVisitin interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- the root nodestate- the state
-
enterNode
Description copied from interface:ConfigurationVisitorCalled once per node, for every node.- Specified by:
enterNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- the current nodestate- provided state
-
enterMappingNode
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.- Specified by:
enterMappingNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- current nodestate- provided state
-
enterListNode
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.- Specified by:
enterListNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- current nodestate- provided state
-
enterScalarNode
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.- Specified by:
enterScalarNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- current nodestate- provided state
-
exitMappingNode
Description copied from interface:ConfigurationVisitorCalled for a list node after the node and any of its children have been visited.- Specified by:
exitMappingNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- the node that has been visitedstate- provided state
-
exitListNode
Description copied from interface:ConfigurationVisitorCalled for a list node after the node and any of its children have been visited.- Specified by:
exitListNodein interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
node- the node that has been visitedstate- provided state
-
endVisit
Description copied from interface:ConfigurationVisitorCalled after every node has been visited, to allow for cleanup and validation.- Specified by:
endVisitin interfaceConfigurationVisitor<S,T, org.spongepowered.configurate.VisitorSafeNoopException> - Parameters:
state- provided state- Returns:
- a terminal value
-