Package com.carmanconsulting.cassidy.exception

Examples of com.carmanconsulting.cassidy.exception.SerializerNotFoundException


        Serializer<?> serializer = SerializerTypeInferer.getSerializer(type);
        if (serializer == null && Serializable.class.isAssignableFrom(type)) {
            serializer = ObjectSerializer.get();
        }
        if (serializer == null) {
            throw new SerializerNotFoundException(type);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here


        if (Byte.class.isInstance(object)) {
            return (Serializer<T>)ByteSerializer.get();
        }
        Serializer<?> serializer = SerializerTypeInferer.getSerializer(object);
        if (serializer == null) {
            throw new SerializerNotFoundException(object);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here

        Serializer<?> serializer = SerializerTypeInferer.getSerializer(type);
        if (serializer == null && Serializable.class.isAssignableFrom(type)) {
            serializer = ObjectSerializer.get();
        }
        if (serializer == null) {
            throw new SerializerNotFoundException(type);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here

        if (Byte.class.isInstance(object)) {
            return (Serializer<T>) ByteSerializer.get();
        }
        Serializer<?> serializer = SerializerTypeInferer.getSerializer(object);
        if (serializer == null) {
            throw new SerializerNotFoundException(object);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here

        Serializer<?> serializer = SerializerTypeInferer.getSerializer(type);
        if (serializer == null && Serializable.class.isAssignableFrom(type)) {
            serializer = ObjectSerializer.get();
        }
        if (serializer == null) {
            throw new SerializerNotFoundException(type);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public static <T> Serializer<T> inferSerializer(T object) {
        Serializer<?> serializer = SerializerTypeInferer.getSerializer(object);
        if (serializer == null) {
            throw new SerializerNotFoundException(object);
        }
        return (Serializer<T>) serializer;
    }
View Full Code Here

    @Override
    @SuppressWarnings("unchecked")
    public <T> Serializer<T> getSerializer(Class<T> type) {
        SerializerFactory<T> factory = findSerializerFactory(type);
        if (factory == null) {
            throw new SerializerNotFoundException(type);
        }
        return factory.createSerializer(type);
    }
View Full Code Here

TOP

Related Classes of com.carmanconsulting.cassidy.exception.SerializerNotFoundException

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.