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.Object
The 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.
  • Constructor Details

    • NodeDefinition

      public NodeDefinition()
  • Method Details

    • 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