public abstract class AbstractOptionAccessor<T> extends AbstractOptionMapping<T> implements OptionAccessor<T>
defaultValue, key, type
Modifier | Constructor and Description |
---|---|
protected |
AbstractOptionAccessor(com.google.common.reflect.TypeToken<T> type,
java.lang.String key,
T defaultValue)
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getRawValue(Options options) |
java.lang.Object |
getRawValue(OptionsReader reader) |
T |
getValue(Options options) |
T |
getValue(OptionsReader reader) |
protected abstract OptionParser<? extends T> |
parser() |
java.lang.Object |
putDefaultValue(Options options) |
java.lang.Object |
putDefaultValue(OptionsWriter writer) |
java.lang.Object |
putRawValue(Options options,
java.lang.Object value) |
java.lang.Object |
putRawValue(OptionsWriter writer,
java.lang.Object value) |
java.lang.Object |
putValue(Options options,
T value) |
java.lang.Object |
putValue(OptionsWriter writer,
T value) |
protected abstract OptionsReader |
reader(Options options) |
OptionMapping<T> |
toMapping() |
protected abstract OptionsWriter |
writer(Options options) |
getDefaultValue, getKey, getType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultValue, getKey, getType
protected abstract OptionsReader reader(Options options)
protected abstract OptionsWriter writer(Options options)
protected abstract OptionParser<? extends T> parser()
public java.lang.Object putValue(Options options, @Nullable T value)
putValue
in interface OptionAccessor<T>
public java.lang.Object putValue(OptionsWriter writer, @Nullable T value)
putValue
in interface OptionAccessor<T>
public java.lang.Object putDefaultValue(Options options)
putDefaultValue
in interface OptionAccessor<T>
public java.lang.Object putDefaultValue(OptionsWriter writer)
putDefaultValue
in interface OptionAccessor<T>
public java.lang.Object putRawValue(Options options, @Nullable java.lang.Object value)
putRawValue
in interface OptionAccessor<T>
public java.lang.Object putRawValue(OptionsWriter writer, @Nullable java.lang.Object value)
putRawValue
in interface OptionAccessor<T>
public T getValue(Options options)
getValue
in interface OptionAccessor<T>
public T getValue(OptionsReader reader)
getValue
in interface OptionAccessor<T>
public java.lang.Object getRawValue(Options options)
getRawValue
in interface OptionAccessor<T>
public java.lang.Object getRawValue(OptionsReader reader)
getRawValue
in interface OptionAccessor<T>
public OptionMapping<T> toMapping()
toMapping
in interface OptionAccessor<T>