@Test public void testMaskAndUnmask() throws ClassNotFoundException { unmaskRules.add("org.apache.ant."); maskRules.add("org.apache.ant.foo."); rules = new ClassloadRules(maskRules, unmaskRules); assertThat(rules.canLoad("org.apache.ant.something")).isTrue(); assertThat(rules.canLoad("org.apache.ant.foo.something")).isFalse(); assertThat(rules.canLoad("org.apache")).isFalse(); }
public boolean canLoad(String className) { return unmaskSize(className) > maskSize(className); }
ClassloadRules { public boolean canLoad(String className) { return unmaskSize(className) > maskSize(className); } }
ClassloadRules { public boolean canLoad(String className) { return unmaskSize(className) > maskSize(className); } ClassloadRules(Set<String> maskRules, Set<String> unmaskRules); }
ClassloadRules { public boolean canLoad(String className) { return unmaskSize(className) > maskSize(className); } ClassloadRules(Set<String> maskRules, Set<String> unmaskRules); boolean canLoad(String className); }
ClassloadRules { public boolean canLoad(String className) { return unmaskSize(className) > maskSize(className); } ClassloadRules(Set<String> maskRules, Set<String> unmaskRules); boolean canLoad(String className);  }