Skip to content

Commit

Permalink
Simplified matcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Dec 19, 2016
1 parent 5b88c71 commit ea2bfdc
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -4081,11 +4081,11 @@ public <V> MethodDefinition.ReceiverTypeDefinition<U> defaultValue(V value, Clas
* @return A matcher for the interfaces' methods. * @return A matcher for the interfaces' methods.
*/ */
private MethodDefinition.ImplementationDefinition<U> interfaceType() { private MethodDefinition.ImplementationDefinition<U> interfaceType() {
ElementMatcher.Junction<MethodDescription> elementMatcher = none(); ElementMatcher.Junction<TypeDescription> elementMatcher = none();
for (TypeDescription typeDescription : interfaces.asErasures()) { for (TypeDescription typeDescription : interfaces.asErasures()) {
elementMatcher = elementMatcher.or(isDeclaredBy(isSuperTypeOf(typeDescription))); elementMatcher = elementMatcher.or(isSuperTypeOf(typeDescription));
} }
return materialize().invokable(isDeclaredBy(isInterface()).and(elementMatcher)); return materialize().invokable(isDeclaredBy(isInterface().and(elementMatcher)));
} }


/** /**
Expand Down

0 comments on commit ea2bfdc

Please sign in to comment.