Package org.springmodules.xt.model.generator.support

Examples of org.springmodules.xt.model.generator.support.ObjectConstructionException


        try {
            Constructor constructor = this.productClass.getConstructor(typesArray);
            Object product = constructor.newInstance(argsArray);
            return product;
        } catch (NoSuchMethodException ex) {
            throw new ObjectConstructionException("No constructor found accepting the following array of types: "
                    + ToStringBuilder.reflectionToString(typesArray, ToStringStyle.SIMPLE_STYLE)
                    + " Have you correctly set all constructor arguments?", ex);
        } catch (InvocationTargetException ex) {
            throw new ObjectConstructionException("Exception thrown by the underlying constructor: "
                    + ex.getMessage(), ex);
        } catch (IllegalAccessException ex) {
            throw new ObjectConstructionException("Cannot access a constructor with the following array of types: "
                    + ToStringBuilder.reflectionToString(typesArray, ToStringStyle.SIMPLE_STYLE)
                    + " Have you correctly set all constructor arguments?", ex);
        } catch (InstantiationException ex) {
            throw new ObjectConstructionException("Unable to instantiate the following class: "
                    + this.productClass, ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.springmodules.xt.model.generator.support.ObjectConstructionException

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.