Package org.apache.geronimo.kernel.repository

Examples of org.apache.geronimo.kernel.repository.ClassLoadingRules


                environment.setConfigId(additionalEnvironment.getConfigId());
            }
            environment.addDependencies(additionalEnvironment.getDependencies());
            environment.setSuppressDefaultEnvironment(environment.isSuppressDefaultEnvironment() || additionalEnvironment.isSuppressDefaultEnvironment());
           
            ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
            ClassLoadingRules additionalClassLoadingRules = additionalEnvironment.getClassLoadingRules();
            classLoadingRules.merge(additionalClassLoadingRules);
        }
    }
View Full Code Here


        List dependencies = toDependencyTypes(environment.getDependencies());
        DependencyType[] dependencyTypes = (DependencyType[]) dependencies.toArray(new DependencyType[dependencies.size()]);
        DependenciesType dependenciesType = environmentType.addNewDependencies();
        dependenciesType.setDependencyArray(dependencyTypes);
       
        ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
        if (classLoadingRules.isInverseClassLoading()) {
            environmentType.addNewInverseClassloading();
        }
       
        if (environment.isSuppressDefaultEnvironment()) {
            environmentType.addNewSuppressDefaultEnvironment();
        }
       
        ClassLoadingRule classLoadingRule = classLoadingRules.getHiddenRule();
        environmentType.setHiddenClasses(toFilterType(classLoadingRule.getClassPrefixes()));
       
        classLoadingRule = classLoadingRules.getNonOverrideableRule();
        environmentType.setNonOverridableClasses(toFilterType(classLoadingRule.getClassPrefixes()));

        classLoadingRule = classLoadingRules.getPrivateRule();
        environmentType.setPrivateClasses(toFilterType(classLoadingRule.getClassPrefixes()));
       
        return environmentType;
    }
View Full Code Here

    public void setUp() throws Exception {
        super.setUp();
        URL url = new File(BASEDIR, "src/test/resources/deployables/cltest/").toURL();
        urls = new URL[]{url};

        classLoadingRules = new ClassLoadingRules();
        classLoadingRules.getHiddenRule().setClassPrefixes(HIDDEN );
        classLoadingRules.getNonOverrideableRule().setClassPrefixes(NON_OVERRIDABLE);
    }
View Full Code Here

                environment.setBundleActivator(additionalEnvironment.getBundleActivator());
            }
           
            environment.setSuppressDefaultEnvironment(environment.isSuppressDefaultEnvironment() || additionalEnvironment.isSuppressDefaultEnvironment());
           
            ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
            ClassLoadingRules additionalClassLoadingRules = additionalEnvironment.getClassLoadingRules();
            classLoadingRules.merge(additionalClassLoadingRules);
        }
    }
View Full Code Here

        }
        for (String dynamicImportPackage: environment.getDynamicImportPackages()) {
            environmentType.addDynamicImportPackage(dynamicImportPackage);
        }
       
        ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
        if (classLoadingRules.isInverseClassLoading()) {
            environmentType.addNewInverseClassloading();
        }
       
        if (environment.isSuppressDefaultEnvironment()) {
            environmentType.addNewSuppressDefaultEnvironment();
        }
       
        ClassLoadingRule classLoadingRule = classLoadingRules.getHiddenRule();
        environmentType.setHiddenClasses(toFilterType(classLoadingRule.getClassPrefixes()));
       
        classLoadingRule = classLoadingRules.getNonOverrideableRule();
        environmentType.setNonOverridableClasses(toFilterType(classLoadingRule.getClassPrefixes()));

        classLoadingRule = classLoadingRules.getPrivateRule();
        environmentType.setPrivateClasses(toFilterType(classLoadingRule.getClassPrefixes()));
       
        return environmentType;
    }
View Full Code Here

            environment.addDynamicImportPackages(environmentType.getDynamicImportPackage());


            environment.setSuppressDefaultEnvironment(environmentType.isSuppressDefaultEnvironment());

            ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
            classLoadingRules.setInverseClassLoading(environmentType.isInverseClassloading());

            if (environmentType.getHiddenClasses() != null) {
                ClassLoadingRule hiddenRule = classLoadingRules.getHiddenRule();
                List<String> filter = environmentType.getHiddenClasses().getFilter();
                hiddenRule.setClassPrefixes(new HashSet<String>(filter));
            }

            if (environmentType.getNonOverridableClasses() != null) {
                ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
                List<String> filter = environmentType.getNonOverridableClasses().getFilter();
                nonOverrideableRule.setClassPrefixes(new HashSet<String>(filter));
            }
        }
        if (!environment.isSuppressDefaultEnvironment()) {
View Full Code Here

    public MultiParentClassLoader(Artifact id, URL[] urls) {
        super(urls);
        this.id = id;

        parents = new ClassLoader[]{ClassLoader.getSystemClassLoader()};
        classLoadingRules = new ClassLoadingRules();
        ClassLoaderRegistry.add(this);
    }
View Full Code Here

    public MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents) {
        super(urls);
        this.id = id;
        this.parents = copyParents(parents);

        classLoadingRules = new ClassLoadingRules();
        ClassLoaderRegistry.add(this);
    }
View Full Code Here

    public MultiParentClassLoader(Artifact id, URL[] urls, ClassLoader[] parents, URLStreamHandlerFactory factory) {
        super(urls, null, factory);
        this.id = id;
        this.parents = copyParents(parents);

        classLoadingRules = new ClassLoadingRules();
        ClassLoaderRegistry.add(this);
    }
View Full Code Here

            //
            // Build the configuration class loader
            //
            configurationClassLoader = createConfigurationClasssLoader(parents, environment, classPath);
           
            ClassLoadingRules rules = environment.getClassLoadingRules();
            childrenConfigurationClassLoader = new ChildrenConfigurationClassLoader(configurationClassLoader, rules);

            //
            // Get all service parents in depth first order
            //
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.repository.ClassLoadingRules

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.