@Target(value=FIELD) @Retention(value=CLASS) public static @interface Setting.Info
Setting.Factory
).
A declared setting field is one initialized with Setting.declare()
\@Setting.Factory
class MySettings {
\@Setting.Group.Info(id="a", desc="A group")
static final A_GROUP = Setting.Group.declare()
\@Setting.Info(name="a.setting", group="a", desc="A Setting", def="10")
static final A_SETTING = Setting.declare()
}
Modifier and Type | Fields and Description |
---|---|
static String |
NO_DEFAULT |
Modifier and Type | Required Element and Description |
---|---|
String |
desc
Description of the setting.
|
String |
group
Id of the group to which the setting belongs.
|
String |
name
Primary name of the setting.
|
Modifier and Type | Optional Element and Description |
---|---|
String[] |
alternateNames
Alternate names for the setting.
|
String |
def
Static default value of the setting.
|
String |
defDynamic
Code that will be directly copied and used as a dynamic default value.
|
String |
defStatic
Code that will be directly copied and used to provide an initial
static default value.
|
int |
max
Maximum allowed value for setting.
|
int |
min
Minimum allowed value for setting.
|
public static final String NO_DEFAULT
public abstract String name
this.is.a.setting-name
) to ensure it
can be translated and used via command line easily.public abstract String group
public abstract String desc
public abstract String def
public abstract String defDynamic
def()
is treated as a description of
the dynamic value and defStatic()
is ignored.Setting
public abstract String defStatic
def()
is treated as a description of
the dynamic value. If defDynamic()
is provided this value
is ignored.Setting
public abstract int min
Setting
public abstract int max
Setting