Class ConfigurationLoader
- java.lang.Object
-
- net.frozenspace.frostlib.data.Loader
-
- net.frozenspace.frostlib.configuration.ConfigurationLoader
-
public class ConfigurationLoader extends Loader
CommandManager is used for creating/loading configuration file by loading class annotated withConfigurationEach field in the class will be loaded from the file created/loaded
-
-
Constructor Summary
Constructors Constructor Description ConfigurationLoader(@NotNull org.bukkit.plugin.Plugin plugin)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ConfigurationLoaderexcludeFieldsWithoutManageAnnotation()This method is used for excluding all fields in the classes who don't have theManageannotation<T> Tload(T obj)This method will load all the field in the object in parameter IfexcludeFieldsWithoutManageAnnotation()has been called before All the fields without this annotation will be ignoredvoidsave(@NotNull java.lang.Object obj)This method will save all the field of the object in the file IfexcludeFieldsWithoutManageAnnotation()has been called before All the fields without this annotation will be ignored
-
-
-
Method Detail
-
excludeFieldsWithoutManageAnnotation
@NotNull public @NotNull ConfigurationLoader excludeFieldsWithoutManageAnnotation()
This method is used for excluding all fields in the classes who don't have theManageannotation- Returns:
- The current instance
-
load
@NotNull public <T> T load(@NotNull T obj)This method will load all the field in the object in parameter IfexcludeFieldsWithoutManageAnnotation()has been called before All the fields without this annotation will be ignored
-
save
public void save(@NotNull @NotNull java.lang.Object obj)This method will save all the field of the object in the file IfexcludeFieldsWithoutManageAnnotation()has been called before All the fields without this annotation will be ignored- Parameters:
obj- Object to save
-
-