@Test(expected = IllegalStateException.class) @JavaVersionRule.Enforce(8) public void testDeclaredAndImplementedAmbiguousMethodThrowsException() throws Exception { new ByteBuddy() .subclass(Class.forName(SINGLE_DEFAULT_METHOD_CLASS)) .implement(Class.forName(SINGLE_DEFAULT_METHOD), Class.forName(CONFLICTING_INTERFACE)) .method(not(isDeclaredBy(Object.class))) .intercept(DefaultMethodCall.unambiguousOnly()) .make(); }
public static Implementation unambiguousOnly() { return new DefaultMethodCall(Collections.<TypeDescription>emptyList()); }
DefaultMethodCall implements Implementation { public static Implementation unambiguousOnly() { return new DefaultMethodCall(Collections.<TypeDescription>emptyList()); } }
DefaultMethodCall implements Implementation { public static Implementation unambiguousOnly() { return new DefaultMethodCall(Collections.<TypeDescription>emptyList()); } protected  DefaultMethodCall(List<TypeDescription> prioritizedInterfaces); }
DefaultMethodCall implements Implementation { public static Implementation unambiguousOnly() { return new DefaultMethodCall(Collections.<TypeDescription>emptyList()); } protected  DefaultMethodCall(List<TypeDescription> prioritizedInterfaces); static Implementation prioritize(Class<?>... prioritizedInterface); static Implementation prioritize(Iterable<? extends Class<?>> prioritizedInterfaces); static Implementation prioritize(TypeDescription... prioritizedInterface); static Implementation prioritize(Collection<? extends TypeDescription> prioritizedInterfaces); static Implementation unambiguousOnly(); InstrumentedType prepare(InstrumentedType instrumentedType); ByteCodeAppender appender(Target implementationTarget); }
DefaultMethodCall implements Implementation { public static Implementation unambiguousOnly() { return new DefaultMethodCall(Collections.<TypeDescription>emptyList()); } protected  DefaultMethodCall(List<TypeDescription> prioritizedInterfaces); static Implementation prioritize(Class<?>... prioritizedInterface); static Implementation prioritize(Iterable<? extends Class<?>> prioritizedInterfaces); static Implementation prioritize(TypeDescription... prioritizedInterface); static Implementation prioritize(Collection<? extends TypeDescription> prioritizedInterfaces); static Implementation unambiguousOnly(); InstrumentedType prepare(InstrumentedType instrumentedType); ByteCodeAppender appender(Target implementationTarget);  }