Package ninja.leaping.configurate
Interface ConfigurationVisitor.Safe<S,T>
-
- Type Parameters:
S
- state typeT
- terminal value type
- All Superinterfaces:
ConfigurationVisitor<S,T,ninja.leaping.configurate.VisitorSafeNoopException>
- Enclosing interface:
- ConfigurationVisitor<S,T,E extends Exception>
public static interface ConfigurationVisitor.Safe<S,T> extends ConfigurationVisitor<S,T,ninja.leaping.configurate.VisitorSafeNoopException>
A subinterface for visitors that do not throw any checked exceptions during their execution
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ninja.leaping.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 validationvoid
enterListNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for list nodesvoid
enterMappingNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for mapping nodesvoid
enterNode(ConfigurationNode node, S state)
Called once per node, for every nodevoid
enterScalarNode(ConfigurationNode node, S state)
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)
for scalar nodesvoid
exitListNode(ConfigurationNode node, S state)
Called for a list node after the node and any of its children have been visitedvoid
exitMappingNode(ConfigurationNode node, S state)
Called for a list node after the node and any of its children have been visitedS
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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.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,ninja.leaping.configurate.VisitorSafeNoopException>
- Parameters:
state
- provided state- Returns:
- a terminal value
-
-