-
- Type Parameters:
Item- a type of option
public interface ConfigList<Item>A basic structure for configuring a plugin. It assumes that the plugin have some list of default options that could be disabled by the user. Also, the user is able to add their own options. The implementation class is assumed to be used with the reflection approach of tools like Jackson or Maven. For Maven configuration, it could look like the following:<configuration> <annotations> <disableAllDefaults>false</disableAllDefaults> <disable> <annotation>javax.annotations.Nonnull</annotation> </disable> <use> <annotation>io.github.my.annotations.Nonnull</annotation> </use> </annotations> </configuration>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classConfigList.Processor<Item>Analyzer for the ConfigList class.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Item>getDisabledOptions()Gets a list of default options the user wants to disable.Collection<Item>getUsedOptions()Gets a list of custom options the user wants to use.booleanshouldAllDefaultsBeDisabled()Indicates if the user wants to disable all default options.
-
-
-
Method Detail
-
getDisabledOptions
Collection<Item> getDisabledOptions()
Gets a list of default options the user wants to disable.- Returns:
- a list of disabled options.
-
getUsedOptions
Collection<Item> getUsedOptions()
Gets a list of custom options the user wants to use.- Returns:
- a list of used options.
-
shouldAllDefaultsBeDisabled
boolean shouldAllDefaultsBeDisabled()
Indicates if the user wants to disable all default options.- Returns:
- a flag of disabling all the default options.
-
-