Package com.esotericsoftware.kryo.serializers

Examples of com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.removeField()


    object1.child = new TestClass();
    object1.other = new AnotherClass();
    object1.other.value = "meow";

    CompatibleFieldSerializer serializer = new CompatibleFieldSerializer(kryo, TestClass.class);
    serializer.removeField("text");
    kryo.register(TestClass.class, serializer);
    kryo.register(AnotherClass.class, new CompatibleFieldSerializer(kryo, AnotherClass.class));
    roundTrip(74, 74, object1);

    kryo.register(TestClass.class, new CompatibleFieldSerializer(kryo, TestClass.class));
View Full Code Here


    kryo.register(TestClass.class, new CompatibleFieldSerializer(kryo, TestClass.class));
    roundTrip(88, 88, object1);

    CompatibleFieldSerializer serializer = new CompatibleFieldSerializer(kryo, TestClass.class);
    serializer.removeField("text");
    kryo.register(TestClass.class, serializer);
    Object object2 = kryo.readClassAndObject(input);
    assertEquals(object1, object2);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.