/** Instances of the specified class will use the specified serializer when {@link #register(Class)} or * {@link #register(Class, int)} are called. * @see #setDefaultSerializer(Class) */ public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); DefaultSerializerEntry entry = new DefaultSerializerEntry(type, new PseudoSerializerFactory(serializer)); defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry); }
/** Instances of the specified class will use the specified serializer. * @see #setDefaultSerializer(Class) */ public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); DefaultSerializerEntry entry = new DefaultSerializerEntry(type, new PseudoSerializerFactory(serializer)); defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry); }
/** Instances of the specified class will use the specified serializer when {@link #register(Class)} or * {@link #register(Class, int)} are called. * @see #setDefaultSerializer(Class) */ public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); DefaultSerializerEntry entry = new DefaultSerializerEntry(type, new PseudoSerializerFactory(serializer)); defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry); }
/** Instances of the specified class will use the specified serializer. * @see #setDefaultSerializer(Class) */ public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); DefaultSerializerEntry entry = new DefaultSerializerEntry(type, new PseudoSerializerFactory(serializer)); defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry); }