private static class FieldWrapper.PrimitiveWrapper extends FieldWrapper.SingleValueFieldWrapper
FieldWrapper.BeanEntry<K,V>
category, field, instance, name
Modifier | Constructor and Description |
---|---|
private |
PrimitiveWrapper(java.lang.String category,
java.lang.reflect.Field field,
java.lang.Object instance) |
Modifier and Type | Method and Description |
---|---|
ITypeAdapter |
getTypeAdapter() |
java.lang.Object |
getValue(java.lang.String key) |
void |
setupConfiguration(Configuration cfg,
java.lang.String desc,
java.lang.String langKey,
boolean reqMCRestart,
boolean reqWorldRestart) |
void |
setupConfiguration(Configuration cfg,
java.lang.String desc,
java.lang.String langKey,
boolean reqMCRestart,
boolean reqWorldRestart,
boolean hasSlidingControl) |
void |
setValue(java.lang.String key,
java.lang.Object value) |
getCategory, getKeys, handlesKey, hasKey
get, hasWrapperFor
private PrimitiveWrapper(java.lang.String category, java.lang.reflect.Field field, java.lang.Object instance)
public ITypeAdapter getTypeAdapter()
public java.lang.Object getValue(java.lang.String key)
key
- the fully qualified property keypublic void setValue(java.lang.String key, java.lang.Object value)
key
- the fully qualified property keyvalue
- the target value of the property associated with the keypublic void setupConfiguration(Configuration cfg, java.lang.String desc, java.lang.String langKey, boolean reqMCRestart, boolean reqWorldRestart)
public void setupConfiguration(Configuration cfg, java.lang.String desc, java.lang.String langKey, boolean reqMCRestart, boolean reqWorldRestart, boolean hasSlidingControl)
setupConfiguration
in interface IFieldWrapper
setupConfiguration
in class FieldWrapper.SingleValueFieldWrapper
cfg
- The configuration object holding the propertiesdesc
- The properties descriptionlangKey
- The languageKey of the property, used in GUIreqMCRestart
- True, if a change in this property requires a restart of MinecraftreqWorldRestart
- True, if the world needs to be reloaded after changes to this propertyhasSlidingControl
- true if the property is going to have a slider control attached in the configuration UI;
works in conjunction with Config.RangeInt
and Config.RangeDouble