public class TypedConfig<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected Class<? extends T> |
configEntryType |
protected Method |
converterMethod |
protected Object |
customTypeConverter |
protected T |
defaultValue |
protected String |
key |
Constructor and Description |
---|
TypedConfig(String key,
T defaultValue) |
TypedConfig(String key,
T defaultValue,
Class<T> targetType) |
TypedConfig(String key,
T defaultValue,
Object customTypeConverter) |
TypedConfig(String key,
T defaultValue,
Object customTypeConverter,
Class<T> targetType) |
Modifier and Type | Method and Description |
---|---|
protected Class<? extends T> |
getConfigEntryType(Class<T> targetType,
T defaultValue) |
protected Method |
getCustomTypeConverterMethod(Object customTypeConverter) |
T |
getDefaultValue() |
String |
getKey() |
T |
getValue() |
protected void |
validateConfigEntryType() |
protected final String key
protected final T defaultValue
protected final Object customTypeConverter
protected final Method converterMethod
protected Class<? extends T> getConfigEntryType(Class<T> targetType, T defaultValue)
protected Method getCustomTypeConverterMethod(Object customTypeConverter)
protected void validateConfigEntryType()
public String getKey()
public T getDefaultValue()
public T getValue()
Copyright © 2014 The Apache Software Foundation. All rights reserved.