Package org.openengsb.core.util

Examples of org.openengsb.core.util.CompositeClassLoader


    private Connector createProxy(VirtualType handler, Collection<Class<?>> interfaces) {
        Class<? extends Domain> domainInterface = domainProvider.getDomainInterface();
        Set<Class<?>> classes = Sets.newHashSet(interfaces);
        classes.add(domainInterface);
        classes.add(Connector.class);
        CompositeClassLoader compositeClassLoader = makeCompositeClassLoader(domainInterface, classes);
        Class<?>[] classesAsArray = classes.toArray(new Class<?>[classes.size()]);
        return (Connector) Proxy.newProxyInstance(compositeClassLoader, classesAsArray, handler);
    }
View Full Code Here


        return (Connector) Proxy.newProxyInstance(compositeClassLoader, classesAsArray, handler);
    }

    private CompositeClassLoader makeCompositeClassLoader(Class<? extends Domain> domainInterface,
        Collection<Class<?>> classes) {
        CompositeClassLoader compositeClassLoader = new CompositeClassLoader(getClass().getClassLoader(),
                domainInterface.getClassLoader());
        for (Class<?> clazz : classes) {
            compositeClassLoader.add(clazz.getClassLoader());
        }
        return compositeClassLoader;
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.util.CompositeClassLoader

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.