Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* Copyright (c) 2008, Nathan Sweet
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
  * conditions are met:
  * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
  * disclaimer in the documentation and/or other materials provided with the distribution.
 * - Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived
 * from this software without specific prior written permission.
package com.esotericsoftware.kryo;

Allows implementing classes to perform their own copying. Hand written copying can be more efficient in some cases.

This method is used instead of the registered serializer Serializer.copy(com.esotericsoftware.kryo.Kryo,java.lang.Object) method.

Nathan Sweet <>
public interface KryoCopyable<T> {
Returns a copy that has the same values as this object. Before Kryo can be used to copy child objects, Kryo.reference(java.lang.Object) must be called with the copy to ensure it can be referenced by the child objects.

	public T copy (Kryo kryo);
New to GrepCode? Check out our FAQ X