Package org.apache.geronimo.kernel.repository

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


            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()) {
            EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
        }
View Full Code Here


       
        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 static void configureRules(ClassLoadingRules classLoadingRules, EnvironmentType environmentType) {
        classLoadingRules.setInverseClassLoading(environmentType.isSetInverseClassloading());
       
        if (null != environmentType.getHiddenClasses()) {
            ClassLoadingRule hiddenRule = classLoadingRules.getHiddenRule();
            hiddenRule.setClassPrefixes(toFilters(environmentType.getHiddenClasses()));
        }
       
        if (null != environmentType.getNonOverridableClasses()) {
            ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
            nonOverrideableRule.setClassPrefixes(toFilters(environmentType.getNonOverridableClasses()));
        }
       
        if (null != environmentType.getPrivateClasses()) {
            ClassLoadingRule privateRule = classLoadingRules.getPrivateRule();
            privateRule.setClassPrefixes(toFilters(environmentType.getPrivateClasses()));
        }
    }
View Full Code Here

            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()) {
            EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
        }
View Full Code Here

       // To avoid yet another CNFE we'll simply return null and let the caller handle appropriately.
      return null;
    }

    private boolean isNonOverridableClass(String name) {
        ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
        return nonOverrideableRule.isFilteredClass(name);
    }
View Full Code Here

        ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
        return nonOverrideableRule.isFilteredClass(name);
    }

    private boolean isHiddenClass(String name) {
        ClassLoadingRule hiddenRule = classLoadingRules.getHiddenRule();
        return hiddenRule.isFilteredClass(name);
    }
View Full Code Here

    protected Enumeration<URL> internalfindResources(String name) throws IOException {
        return super.findResources(name);
    }

    private boolean isNonOverridableResource(String name) {
        ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
        return nonOverrideableRule.isFilteredResource(name);
    }
View Full Code Here

        ClassLoadingRule nonOverrideableRule = classLoadingRules.getNonOverrideableRule();
        return nonOverrideableRule.isFilteredResource(name);
    }

    private boolean isHiddenResource(String name) {
        ClassLoadingRule hiddenRule = classLoadingRules.getHiddenRule();
        return hiddenRule.isFilteredResource(name);
    }
View Full Code Here

       
        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

        addPrivateConfiguration();
        assertFalse(classLoader.getResources(privateResourceName).hasMoreElements());
    }

    private void addPrivateConfiguration() {
        ClassLoadingRule rule = rules.getPrivateRule();
        rule.addClassPrefixes(Collections.singleton(privateResourceClass));
    }
View Full Code Here

TOP

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

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.