Package jodd.typeconverter.impl
Class ShortArrayConverter
- java.lang.Object
-
- jodd.typeconverter.impl.ShortArrayConverter
-
- All Implemented Interfaces:
TypeConverter<short[]>
public class ShortArrayConverter extends java.lang.Object implements TypeConverter<short[]>
Converts given object toshort[].
-
-
Field Summary
Fields Modifier and Type Field Description protected TypeConverterManagertypeConverterManager
-
Constructor Summary
Constructors Constructor Description ShortArrayConverter(TypeConverterManager typeConverterManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short[]convert(java.lang.Object value)Converts object received as parameter into object of another class.protected short[]convertArrayToArray(java.lang.Object value)Converts array value to array.protected short[]convertPrimitiveArrayToArray(java.lang.Object value, java.lang.Class primitiveComponentType)Converts primitive array to target array.protected short[]convertToSingleElementArray(java.lang.Object value)Creates an array with single element.protected shortconvertType(java.lang.Object value)Converts type using type converter manager.protected short[]convertValueToArray(java.lang.Object value)Converts non-array value to array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jodd.typeconverter.TypeConverter
convert
-
-
-
-
Field Detail
-
typeConverterManager
protected final TypeConverterManager typeConverterManager
-
-
Constructor Detail
-
ShortArrayConverter
public ShortArrayConverter(TypeConverterManager typeConverterManager)
-
-
Method Detail
-
convert
public short[] convert(java.lang.Object value)
Description copied from interface:TypeConverterConverts object received as parameter into object of another class. For example, anIntegerconverter tries to convert given objects into targetIntegerobject. Converters should try all reasonable ways of conversion into target object, depending on target type.- Specified by:
convertin interfaceTypeConverter<short[]>- Parameters:
value- object to convert from- Returns:
- resulting object converted to target type
-
convertType
protected short convertType(java.lang.Object value)
Converts type using type converter manager.
-
convertToSingleElementArray
protected short[] convertToSingleElementArray(java.lang.Object value)
Creates an array with single element.
-
convertValueToArray
protected short[] convertValueToArray(java.lang.Object value)
Converts non-array value to array. Detects various collection types and iterates them to make conversion and to create target array.
-
convertArrayToArray
protected short[] convertArrayToArray(java.lang.Object value)
Converts array value to array.
-
convertPrimitiveArrayToArray
protected short[] convertPrimitiveArrayToArray(java.lang.Object value, java.lang.Class primitiveComponentType)Converts primitive array to target array.
-
-