Skip to content

Commit

Permalink
Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed Jun 25, 2015
1 parent 3b2a6e1 commit 04eb603
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/com/esotericsoftware/kryo/Kryo.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public void setDefaultSerializer (Class<? extends Serializer> serializer) {
defaultSerializer = new ReflectionSerializerFactory(serializer);
}

/** Instances of the specified class will use the specified serializer.
/** 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.");
Expand All @@ -250,14 +251,18 @@ public void addDefaultSerializer (Class type, Serializer serializer) {
defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry);
}

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

/** Instances of the specified class will use the specified serializer. Serializer instances are created as needed via
/** Instances of the specified class will use the specified serializer when {@link #register(Class)} or
* {@link #register(Class, int)} are called. Serializer instances are created as needed via
* {@link ReflectionSerializerFactory#makeSerializer(Kryo, Class, Class)}. By default, the following classes have a default
* serializer set:
* <p>
Expand Down

0 comments on commit 04eb603

Please sign in to comment.