de.javakaffee.kryoserializers
Class ReferenceFieldSerializerReflectionFactorySupport

java.lang.Object
  extended by com.esotericsoftware.kryo.Serializer
      extended by com.esotericsoftware.kryo.serialize.FieldSerializer
          extended by com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer
              extended by de.javakaffee.kryoserializers.ReferenceFieldSerializerReflectionFactorySupport

public class ReferenceFieldSerializerReflectionFactorySupport
extends com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer

A ReferenceFieldSerializer specialization that uses sun's ReflectionFactory to create new instances for classes without a default constructor (via reuse of KryoReflectionFactorySupport.newInstanceFromReflectionFactory(Class)).

Author:
Martin Grotzke

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esotericsoftware.kryo.serialize.FieldSerializer
com.esotericsoftware.kryo.serialize.FieldSerializer.CachedField
 
Constructor Summary
ReferenceFieldSerializerReflectionFactorySupport(com.esotericsoftware.kryo.Kryo kryo, Class<?> type)
          Creates a new instance.
 
Method Summary
<T> T
newInstance(com.esotericsoftware.kryo.Kryo kryo, Class<T> type)
           
 
Methods inherited from class com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer
readObjectData, writeObjectData
 
Methods inherited from class com.esotericsoftware.kryo.serialize.FieldSerializer
getField, readObjectData, removeField, setFieldsAsAccessible, setFieldsCanBeNull, setIgnoreSyntheticFields
 
Methods inherited from class com.esotericsoftware.kryo.Serializer
isFinal, readObject, setCanBeNull, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceFieldSerializerReflectionFactorySupport

public ReferenceFieldSerializerReflectionFactorySupport(com.esotericsoftware.kryo.Kryo kryo,
                                                        Class<?> type)
Creates a new instance.

Parameters:
kryo - the kryo instance that is passed to ReferenceFieldSerializer.ReferenceFieldSerializer(Kryo, Class).
type - the type to serialize.
Method Detail

newInstance

public <T> T newInstance(com.esotericsoftware.kryo.Kryo kryo,
                         Class<T> type)
Overrides:
newInstance in class com.esotericsoftware.kryo.Serializer


Copyright © 2010-2011. All Rights Reserved.