@ SuppressWarnings ( "rawtypes" ) protected ISFSArray parseArrayCollection ( GetterMethodCover method , Collection collection ) { ISFSArray result = new SFSArray ( ) ; SFSDataType dataType = ParamTypeParser . getParamType ( method . getGenericType ( ) ) ; Class < ? > type = method . getGenericType ( ) . getComponentType ( ) ; for ( Object obj : collection ) { Object value = obj ; if ( isPrimitiveChar ( type ) ) { value = charArrayToByteArray ( ( char [ ] ) value ) ; } else if ( isWrapperByte ( type ) ) { value = toPrimitiveByteArray ( ( Byte [ ] ) value ) ; } else if ( isWrapperChar ( type ) ) { value = charWrapperArrayToPrimitiveByteArray ( ( Character [ ] ) value ) ; } else { value = arrayToList ( value ) ; } result . add ( new SFSDataWrapper ( dataType , value ) ) ; } return result ; }
Serialize collection of array to a SFSArray