Package ch.qos.logback.core.joran.util
Class StringToObjectConverter
- java.lang.Object
-
- ch.qos.logback.core.joran.util.StringToObjectConverter
-
public class StringToObjectConverter extends java.lang.Object
Utility class which can convert string into objects.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Class<?>[]
STING_CLASS_PARAMETER
-
Constructor Summary
Constructors Constructor Description StringToObjectConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
canBeBuiltFromSimpleString(java.lang.Class<?> parameterClass)
static java.lang.Object
convertArg(ContextAware ca, java.lang.String val, java.lang.Class<?> type)
Convertval
a String parameter to an object of a given type.private static java.lang.Object
convertByValueOfMethod(ContextAware ca, java.lang.Class<?> type, java.lang.String val)
private static java.nio.charset.Charset
convertToCharset(ContextAware ca, java.lang.String val)
private static java.lang.Object
convertToEnum(ContextAware ca, java.lang.String val, java.lang.Class<? extends java.lang.Enum> enumType)
private static boolean
followsTheValueOfConvention(java.lang.Class<?> parameterClass)
static java.lang.reflect.Method
getValueOfMethod(java.lang.Class<?> type)
(package private) boolean
isBuildableFromSimpleString()
private static boolean
isOfTypeCharset(java.lang.Class<?> type)
-
-
-
Method Detail
-
canBeBuiltFromSimpleString
public static boolean canBeBuiltFromSimpleString(java.lang.Class<?> parameterClass)
-
convertArg
public static java.lang.Object convertArg(ContextAware ca, java.lang.String val, java.lang.Class<?> type)
Convertval
a String parameter to an object of a given type.
-
isOfTypeCharset
private static boolean isOfTypeCharset(java.lang.Class<?> type)
-
convertToCharset
private static java.nio.charset.Charset convertToCharset(ContextAware ca, java.lang.String val)
-
getValueOfMethod
public static java.lang.reflect.Method getValueOfMethod(java.lang.Class<?> type)
-
followsTheValueOfConvention
private static boolean followsTheValueOfConvention(java.lang.Class<?> parameterClass)
-
convertByValueOfMethod
private static java.lang.Object convertByValueOfMethod(ContextAware ca, java.lang.Class<?> type, java.lang.String val)
-
convertToEnum
private static java.lang.Object convertToEnum(ContextAware ca, java.lang.String val, java.lang.Class<? extends java.lang.Enum> enumType)
-
isBuildableFromSimpleString
boolean isBuildableFromSimpleString()
-
-