Package io.microsphere.convert
Class StringToCharArrayConverter
- java.lang.Object
-
- io.microsphere.convert.AbstractConverter<java.lang.String,char[]>
-
- io.microsphere.convert.StringToCharArrayConverter
-
- All Implemented Interfaces:
Converter<java.lang.String,char[]>
,StringConverter<char[]>
,Prioritized
,java.lang.Comparable<Prioritized>
public class StringToCharArrayConverter extends AbstractConverter<java.lang.String,char[]> implements StringConverter<char[]>
The class to convertString
tochar[]
- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringToCharArrayConverter
INSTANCE
Singleton instance ofStringToCharArrayConverter
.-
Fields inherited from class io.microsphere.convert.AbstractConverter
logger
-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description StringToCharArrayConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected char[]
doConvert(java.lang.String source)
Converts the non-null source-typed value to the target-typed value.-
Methods inherited from class io.microsphere.convert.AbstractConverter
convert, equals, getPriority, hashCode, resolvePriority
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.convert.Converter
accept, convert, getSourceType, getTargetType
-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo, getPriority
-
-
-
-
Field Detail
-
INSTANCE
public static final StringToCharArrayConverter INSTANCE
Singleton instance ofStringToCharArrayConverter
.
-
-
Method Detail
-
doConvert
protected char[] doConvert(java.lang.String source)
Description copied from class:AbstractConverter
Converts the non-null source-typed value to the target-typed value.This method is called by
AbstractConverter.convert(Object)
after checking if the source is null. Subclasses must implement this method to provide the actual conversion logic.- Specified by:
doConvert
in classAbstractConverter<java.lang.String,char[]>
- Parameters:
source
- the non-null source-typed value- Returns:
- the converted target-typed value, or
null
if conversion is not possible
-
-