Examples of ObjectCreationException


Examples of com.scooterframework.common.exception.ObjectCreationException

        Object o = null;
        try {
            Class<?> c = loadMyClass(className);
            o = c.newInstance();
        } catch (Exception ex) {
            throw new ObjectCreationException(className, ex);
        }
        return o;
    }
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        CompositeContext parent = resolver.getCurrentContext();
        if (parent == null) {
            return null;// FIXME semantic here means required is not followed
        }
        if (!(parent instanceof AutowireContext)) {
            ObjectCreationException e = new ObjectCreationException("Parent does not implement "
                    + AutowireContext.class.getName());
            e.setIdentifier(parent.getName());
            throw e;
        }
        AutowireContext ctx = (AutowireContext) parent;
        AssemblyContext assemblyContext = ctx.resolveInstance(AssemblyContext.class);
        return SDOUtil.createDataFactory(assemblyContext.getTypeHelper());
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        CompositeContext parent = resolver.getCurrentContext();
        if (parent == null) {
            return null;// FIXME semantic here means required is not followed
        }
        if (!(parent instanceof AutowireContext)) {
            ObjectCreationException e = new ObjectCreationException("Parent does not implement "
                    + AutowireContext.class.getName());
            e.setIdentifier(parent.getName());
            throw e;
        }
        AutowireContext ctx = (AutowireContext) parent;
        AssemblyContext assemblyContext = ctx.resolveInstance(AssemblyContext.class);
        return SDOUtil.createXSDHelper(assemblyContext.getTypeHelper());
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        } else if (XSDHelper.class.equals(type)) {
            factory = new XSDHelperObjectFactory(resolver);
        } else if (XMLHelper.class.equals(type)) {
            factory = new XMLHelperObjectFactory(resolver);
        } else {
            ObjectCreationException e = new ObjectCreationException("Unknown type");
            e.setIdentifier(type.getName());
            throw e;
        }
        if (method != null) {
            return new MethodInjector(method, factory);
        }
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        CompositeContext parent = resolver.getCurrentContext();
        if (parent == null) {
            return null;// FIXME semantic here means required is not followed
        }
        if (!(parent instanceof AutowireContext)) {
            ObjectCreationException e = new ObjectCreationException("Parent does not implement "
                    + AutowireContext.class.getName());
            e.setIdentifier(parent.getName());
            throw e;
        }
        AutowireContext ctx = (AutowireContext) parent;
        AssemblyContext assemblyContext = ctx.resolveInstance(AssemblyContext.class);
        return assemblyContext.getTypeHelper();
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        CompositeContext parent = resolver.getCurrentContext();
        if (parent == null) {
            return null;// FIXME semantic here means required is not followed
        }
        if (!(parent instanceof AutowireContext)) {
            ObjectCreationException e = new ObjectCreationException("Parent does not implement "
                    + AutowireContext.class.getName());
            e.setIdentifier(parent.getName());
            throw e;
        }
        AutowireContext ctx = (AutowireContext) parent;
        AssemblyContext assemblyContext = ctx.resolveInstance(AssemblyContext.class);
        return SDOUtil.createXMLHelper(assemblyContext.getTypeHelper());
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

    public Object getInstance() throws ObjectCreationException {
        try {
            return factory.createProxy();
        } catch (ProxyCreationException e) {
            throw new ObjectCreationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.core.injection.ObjectCreationException

        CompositeContext parent = resolver.getCurrentContext();
        if (parent == null) {
            return null;// FIXME semantic here means required is not followed
        }
        if (!(parent instanceof AutowireContext)) {
            ObjectCreationException e = new ObjectCreationException("Parent does not implement "
                    + AutowireContext.class.getName());
            e.setIdentifier(parent.getName());
            throw e;
        }
        AutowireContext ctx = (AutowireContext) parent;
        return ctx.resolveInstance(autowireType);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.core.factory.ObjectCreationException

                        }
                    }
                }    
  
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        }
        return osgiBundle;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.core.factory.ObjectCreationException

            }
               
            return osgiServiceReference;
           
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        }
    }
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.