Interface ConfigLoader<T>

  • All Known Implementing Classes:
    FSConfigLoader

    public interface ConfigLoader<T>
    A generic configuration loader. Purpose is to abstract things like BreakProvider and AccountProvider which have a lot of repeated code. Loadouts are also being added which would otherwise follow the same model as the aforementioned classes. Additionally, we don't retain a list and only load/save when the getAll and save methods are called.
    • Field Detail

      • GSON

        static final com.google.gson.Gson GSON
    • Method Detail

      • getGroupName

        static java.lang.String getGroupName​(java.lang.Class<?> type)
      • createLocal

        static <T> ConfigLoader<T> createLocal​(java.lang.Class<T> type)
      • getName

        java.lang.String getName()
      • getType

        java.lang.Class<T> getType()
      • getAll

        java.util.List<Config> getAll()
      • save

        Config save​(T element,
                    java.lang.String name)
      • delete

        void delete​(Config config)
      • deserialize

        default T deserialize​(Config config)