@Test public void testMatchesChild() throws Exception { when(classLoaderMatcher.matches(classLoader)).thenReturn(true); assertThat(new ClassLoaderHierarchyMatcher<ClassLoader>(classLoaderMatcher).matches(classLoader), is(true)); verify(classLoaderMatcher).matches(classLoader); verifyNoMoreInteractions(classLoaderMatcher); }
public boolean matches(T target) { ClassLoader current = target; while (current != null) { if (matcher.matches(current)) { return true; } current = current.getParent(); } return matcher.matches(null); }
ClassLoaderHierarchyMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { ClassLoader current = target; while (current != null) { if (matcher.matches(current)) { return true; } current = current.getParent(); } return matcher.matches(null); } }
ClassLoaderHierarchyMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { ClassLoader current = target; while (current != null) { if (matcher.matches(current)) { return true; } current = current.getParent(); } return matcher.matches(null); } ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader> matcher); }
ClassLoaderHierarchyMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { ClassLoader current = target; while (current != null) { if (matcher.matches(current)) { return true; } current = current.getParent(); } return matcher.matches(null); } ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader> matcher); boolean matches(T target); @Override String toString(); }
ClassLoaderHierarchyMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { ClassLoader current = target; while (current != null) { if (matcher.matches(current)) { return true; } current = current.getParent(); } return matcher.matches(null); } ClassLoaderHierarchyMatcher(ElementMatcher<? super ClassLoader> matcher); boolean matches(T target); @Override String toString();  }