Module gomint.api

Class ConfigMapper

    • Constructor Detail

      • ConfigMapper

        public ConfigMapper()
    • Method Detail

      • saveToMap

        public Map<String,​Object> saveToMap​(Class clazz)
                                           throws Exception
        Serialize this object to the field structure of the given class
        Parameters:
        clazz - which holds the fields to serialize
        Returns:
        map containing all paths as keys and value
        Throws:
        Exception - which can be everything
      • loadFromMap

        public void loadFromMap​(Map section,
                                Class clazz)
                         throws Exception
        Deserialize the given map into the field structure of the given class
        Parameters:
        section - map containing all paths as keys and value
        clazz - which holds the field structure
        Throws:
        Exception - which can be everything