private static IObjectSerializer getSerializer ( Class clazz ) { Iterator < Map . Entry < Class , IObjectSerializer > > iterator = serializers . entrySet ( ) . iterator ( ) ; IObjectSerializer serializer = DEFAULT_SERIALIZER ; while ( iterator . hasNext ( ) ) { Map . Entry < Class , IObjectSerializer > entry = iterator . next ( ) ; if ( entry . getKey ( ) . isAssignableFrom ( clazz ) ) { serializer = entry . getValue ( ) ; break ; } } return serializer ; }
Returns a serializer for the class