Package org.rspeer.environment.config
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 Summary
Fields Modifier and Type Field Description static com.google.gson.Gson
GSON
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <T> ConfigLoader<T>
createLocal(java.lang.Class<T> type)
void
delete(Config config)
default T
deserialize(Config config)
java.util.List<Config>
getAll()
static java.lang.String
getGroupName(java.lang.Class<?> type)
java.lang.String
getName()
java.lang.Class<T>
getType()
ConfigLoader<T>
initialize()
Config
save(T element, java.lang.String name)
-
-
-
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()
-
initialize
ConfigLoader<T> initialize()
-
getAll
java.util.List<Config> getAll()
-
delete
void delete(Config config)
-
-