Package ch.kk7.confij.tree
Class NodeDefinition
- java.lang.Object
-
- ch.kk7.confij.tree.NodeDefinition
-
- Direct Known Subclasses:
NodeDefinition.NodeDefinitionLeaf,NodeDefinition.NodeDefinitionList,NodeDefinition.NodeDefinitionMap
public abstract class NodeDefinition extends java.lang.ObjectThe definition of how the config must look like on a high level, like what children it can and must contain. No link to actual config values and therefore static over the livetime of the configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeDefinition.NodeDefinitionLeafstatic classNodeDefinition.NodeDefinitionListstatic classNodeDefinition.NodeDefinitionMap
-
Constructor Summary
Constructors Constructor Description NodeDefinition()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @NonNull NodeDefinitiondefinitionForChild(java.lang.String configKey)@NonNull java.util.Set<java.lang.String>getMandatoryKeys()booleanisValueHolder()
-
-
-
Method Detail
-
isValueHolder
public boolean isValueHolder()
- Returns:
- true if this is a leaf node and can hold a property value
-
definitionForChild
@NonNull public abstract @NonNull NodeDefinition definitionForChild(java.lang.String configKey) throws ConfijBindingException
- Parameters:
configKey- the name/key of the child for which we want the definition- Returns:
- an instance of self for a given named child node.
- Throws:
ConfijBindingException
-
getMandatoryKeys
@NonNull public @NonNull java.util.Set<java.lang.String> getMandatoryKeys()
- Returns:
- a set of required names/keys for child nodes
-
-