Package com.esotericsoftware.kryo.factories

Examples of com.esotericsoftware.kryo.factories.SerializerFactory


    @Test
    public void testExcludeFields() throws Exception {

        final Kryo kryo = new Kryo();
        @SuppressWarnings("unchecked")
    final SerializerFactory disregardingSerializerFactory = new FieldAnnotationAwareSerializer.Factory(
                Arrays.<Class<? extends Annotation>>asList(CustomMark.class), true);
        kryo.addDefaultSerializer(CustomBean.class, disregardingSerializerFactory);

        final byte[] buffer = makeBuffer();
View Full Code Here


    @Test
    public void testIncludeFields() throws Exception {

        final Kryo kryo = new Kryo();
        @SuppressWarnings("unchecked")
    final SerializerFactory regardingSerializerFactory = new FieldAnnotationAwareSerializer.Factory(
                Arrays.<Class<? extends Annotation>>asList(CustomMark.class), false);
        kryo.addDefaultSerializer(CustomBean.class, regardingSerializerFactory);

        final byte[] buffer = makeBuffer();
View Full Code Here

TOP

Related Classes of com.esotericsoftware.kryo.factories.SerializerFactory

Copyright © 2018 www.massapicom. 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.