@Test public void testNoMatchWhenNull() throws Exception { assertThat(new DeclaringTypeMatcher<DeclaredByType>(typeMatcher).matches(declaredByType), is(false)); verifyZeroInteractions(typeMatcher); verify(declaredByType).getDeclaringType(); verifyNoMoreInteractions(declaredByType); }
public boolean matches(T target) { TypeDefinition declaringType = target.getDeclaringType(); return declaringType != null && matcher.matches(declaringType.asGenericType()); }
DeclaringTypeMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { TypeDefinition declaringType = target.getDeclaringType(); return declaringType != null && matcher.matches(declaringType.asGenericType()); } }
DeclaringTypeMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { TypeDefinition declaringType = target.getDeclaringType(); return declaringType != null && matcher.matches(declaringType.asGenericType()); } DeclaringTypeMatcher(ElementMatcher<? super TypeDescription.Generic> matcher); }
DeclaringTypeMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { TypeDefinition declaringType = target.getDeclaringType(); return declaringType != null && matcher.matches(declaringType.asGenericType()); } DeclaringTypeMatcher(ElementMatcher<? super TypeDescription.Generic> matcher); boolean matches(T target); @Override String toString(); }
DeclaringTypeMatcher extends ElementMatcher.Junction.AbstractBase<T> { public boolean matches(T target) { TypeDefinition declaringType = target.getDeclaringType(); return declaringType != null && matcher.matches(declaringType.asGenericType()); } DeclaringTypeMatcher(ElementMatcher<? super TypeDescription.Generic> matcher); boolean matches(T target); @Override String toString();  }