}
return serviceNameConfigs;
}
private <T> T convert(String value, Class<T> type) {
SimpleTypeConverter converter = new SimpleTypeConverter();
if (value != null) {
if (type.isArray()) {
String[] values = value.split(",");
return (T)converter.convertIfNecessary(values, type);
}
if (type.isAssignableFrom(String.class)) {
return (T)value;
}
} else {
if (boolean.class.equals(type)) {
return (T)Boolean.FALSE;
} else if (int.class.equals(type) || long.class.equals(type)) {
return (T)converter.convertIfNecessary(0, type);
}
}
return (T)converter.convertIfNecessary(value, type);
}