private static DataNode marshalObject ( Map < String , AbstractDataMarshaller < ? > > marshallerMap , Object object ) { //can't be null here because it is not resolved: meaning, it is an instance of an unknown class final Class < ? > clazz = object . getClass ( ) ; final AbstractDataMarshaller < Object > serializer = ( AbstractDataMarshaller < Object > ) marshallerMap . get ( clazz . getCanonicalName ( ) ) ; if ( serializer != null ) { final DataNode node = serializer . marshal ( object ) ; node . setObject ( META_CLASS_NAME , serializer . getDataClassName ( ) ) ; return node ; } return null ; //no marshaller - let others decide what to do with that info }
wraps an deSerializedObject using the data marshaller for that given deSerializedObject