Package org.spongepowered.configurate
Interface ConfigurationVisitor.Stateless<E extends java.lang.Exception>
-
- All Superinterfaces:
ConfigurationVisitor<java.lang.Void,java.lang.Void,E>
- Enclosing interface:
- ConfigurationVisitor<S,T,E extends java.lang.Exception>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface ConfigurationVisitor.Stateless<E extends java.lang.Exception> extends ConfigurationVisitor<java.lang.Void,java.lang.Void,E>
Stateless specialization of visitors, where both the state and terminal type are Void.- 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 java.lang.Exception>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidbeginVisit(ConfigurationNode node)Called at the beginning of the visit with a state object created.default voidbeginVisit(ConfigurationNode node, java.lang.Void state)Called at the beginning of the visit with a state object created.default voidendVisit()Called after every node has been visited, to allow for cleanup and validation.default java.lang.VoidendVisit(java.lang.Void state)Called after every node has been visited, to allow for cleanup and validation.default voidenterListNode(ConfigurationNode node)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.default voidenterListNode(ConfigurationNode node, java.lang.Void state)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.default voidenterMappingNode(ConfigurationNode node)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.default voidenterMappingNode(ConfigurationNode node, java.lang.Void state)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.voidenterNode(ConfigurationNode node)Called once per node, for every node.default voidenterNode(ConfigurationNode node, java.lang.Void state)Called once per node, for every node.default voidenterScalarNode(ConfigurationNode node)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.default voidenterScalarNode(ConfigurationNode node, java.lang.Void state)Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.default voidexitListNode(ConfigurationNode node)Called for a list node after the node and any of its children have been visited.default voidexitListNode(ConfigurationNode node, java.lang.Void state)Called for a list node after the node and any of its children have been visited.default voidexitMappingNode(ConfigurationNode node)Called for a mapping node after the node and any of its children have been visited.default voidexitMappingNode(ConfigurationNode node, java.lang.Void state)Called for a list node after the node and any of its children have been visited.default java.lang.VoidnewState()Called to provide a state object if a visit is initiated without one already existing.
-
-
-
Method Detail
-
newState
default java.lang.Void newState()
Description copied from interface:ConfigurationVisitorCalled to provide a state object if a visit is initiated without one already existing.- Specified by:
newStatein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Returns:
- a new state object to be passed through the rest of this visit
-
beginVisit
default void beginVisit(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled at the beginning of the visit with a state object created.- Specified by:
beginVisitin interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- the root nodestate- the state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
beginVisit
default void beginVisit(ConfigurationNode node) throws E extends java.lang.Exception
Called at the beginning of the visit with a state object created.
-
enterNode
default void enterNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled once per node, for every node.- Specified by:
enterNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- the current nodestate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
enterNode
void enterNode(ConfigurationNode node) throws E extends java.lang.Exception
Called once per node, for every node.
-
enterMappingNode
default void enterMappingNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.- Specified by:
enterMappingNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- current nodestate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
enterMappingNode
default void enterMappingNode(ConfigurationNode node) throws E extends java.lang.Exception
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for mapping nodes.
-
enterListNode
default void enterListNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.- Specified by:
enterListNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- current nodestate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
enterListNode
default void enterListNode(ConfigurationNode node) throws E extends java.lang.Exception
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for list nodes.
-
enterScalarNode
default void enterScalarNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.- Specified by:
enterScalarNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- current nodestate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
enterScalarNode
default void enterScalarNode(ConfigurationNode node) throws E extends java.lang.Exception
Called afterConfigurationVisitor.enterNode(ConfigurationNode, Object)for scalar nodes.
-
exitMappingNode
default void exitMappingNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled for a list node after the node and any of its children have been visited.- Specified by:
exitMappingNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- the node that has been visitedstate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
exitMappingNode
default void exitMappingNode(ConfigurationNode node) throws E extends java.lang.Exception
Called for a mapping node after the node and any of its children have been visited.
-
exitListNode
default void exitListNode(ConfigurationNode node, java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled for a list node after the node and any of its children have been visited.- Specified by:
exitListNodein interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
node- the node that has been visitedstate- provided state- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
exitListNode
default void exitListNode(ConfigurationNode node) throws E extends java.lang.Exception
Called for a list node after the node and any of its children have been visited.
-
endVisit
default java.lang.Void endVisit(java.lang.Void state) throws E extends java.lang.Exception
Description copied from interface:ConfigurationVisitorCalled after every node has been visited, to allow for cleanup and validation.- Specified by:
endVisitin interfaceConfigurationVisitor<java.lang.Void,java.lang.Void,E extends java.lang.Exception>- Parameters:
state- provided state- Returns:
- a terminal value
- Throws:
E- when thrown by implementationE extends java.lang.Exception
-
-