Package org.codehaus.preon

Examples of org.codehaus.preon.CodecConstructionException


                    .getAnnotation(BoundExplicitly.class);
            try {
                CodecFactory factory = settings.factory().newInstance();
                return factory.create(metadata, type, null);
            } catch (InstantiationException e) {
                throw new CodecConstructionException(
                        "Failed to construct Codec using "
                                + settings.factory().getName());
            } catch (IllegalAccessException e) {
                throw new CodecConstructionException(
                        "No permission to construct an instance of "
                                + settings.factory().getName());
            }
        } else {
            return null;
View Full Code Here


            BoundObject objectSettings = getObjectSettings(settings);
            return delegate.create(toAnnotatedElemented(objectSettings), objectSettings.type() == Void.class ? Object.class : objectSettings.type(), context);
        } else if (settings.type() != null) {
            return delegate.create(null, settings.type(), context);
        } else {
            throw new CodecConstructionException("Failed to determine the type of element.");
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.preon.CodecConstructionException

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.