Class ConfigDef


  • public class ConfigDef
    extends java.lang.Object
    A definition of a configuration instance.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ConfigDef.Builder
      Builder to build a configuration definition.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ConfigDef.Builder builder()
      Create a builder to build a config def.
      java.util.Set<ConfigKeyGroup> getGroups()  
      java.util.Map<java.lang.String,​ConfigKey> getKeys()  
      java.util.Map<java.lang.String,​java.util.Set<ConfigKey>> getSettings()  
      static ConfigDef of​(java.lang.Class configClass)
      Build the config definitation of a config class.
      void save​(java.io.OutputStream os)  
      void save​(java.nio.file.Path path)  
      void validate​(org.apache.commons.configuration.Configuration conf)
      Validate if the provided conf is a valid configuration of this configuration definition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • builder

        public static ConfigDef.Builder builder()
        Create a builder to build a config def.
        Returns:
        builder to build a config def.
      • validate

        public void validate​(org.apache.commons.configuration.Configuration conf)
                      throws ConfigException
        Validate if the provided conf is a valid configuration of this configuration definition.
        Parameters:
        conf - the configuration to validate
        Throws:
        ConfigException
      • of

        public static ConfigDef of​(java.lang.Class configClass)
        Build the config definitation of a config class.
        Parameters:
        configClass - config class
        Returns:
        config definition.
      • save

        public void save​(java.nio.file.Path path)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • save

        public void save​(java.io.OutputStream os)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getSettings

        public java.util.Map<java.lang.String,​java.util.Set<ConfigKey>> getSettings()
      • getKeys

        public java.util.Map<java.lang.String,​ConfigKey> getKeys()