public abstract class AbstractOptionMapping<T> extends java.lang.Object implements OptionMapping<T>
Modifier and Type | Field and Description |
---|---|
protected T |
defaultValue
Default value, may be
null . |
protected java.lang.String |
key
Option key, non-empty string.
|
protected com.google.common.reflect.TypeToken<T> |
type
Option type, exact runtime type.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractOptionMapping(com.google.common.reflect.TypeToken<T> type,
java.lang.String key,
T defaultValue)
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
T |
getDefaultValue() |
java.lang.String |
getKey() |
com.google.common.reflect.TypeToken<T> |
getType() |
protected final com.google.common.reflect.TypeToken<T> type
protected final java.lang.String key
@Nullable protected final T defaultValue
null
.public final com.google.common.reflect.TypeToken<T> getType()
getType
in interface OptionMapping<T>
public final java.lang.String getKey()
getKey
in interface OptionMapping<T>
public final T getDefaultValue()
getDefaultValue
in interface OptionMapping<T>