@Test(expected = IllegalStateException.class) @JavaVersionRule.Enforce(8) public void testUnrelatedPreferredDefaultMethodThrowsException() throws Exception { new ByteBuddy() .subclass(Object.class) .implement(Class.forName(SINGLE_DEFAULT_METHOD), Class.forName(CONFLICTING_INTERFACE)) .intercept(DefaultMethodCall.prioritize(Class.forName(NON_OVERRIDING_INTERFACE))) .make(); }
public static Implementation prioritize(Class<?>... prioritizedInterface) { return prioritize(new TypeList.ForLoadedTypes(prioritizedInterface)); }
DefaultMethodCall implements Implementation { public static Implementation prioritize(Class<?>... prioritizedInterface) { return prioritize(new TypeList.ForLoadedTypes(prioritizedInterface)); } }
DefaultMethodCall implements Implementation { public static Implementation prioritize(Class<?>... prioritizedInterface) { return prioritize(new TypeList.ForLoadedTypes(prioritizedInterface)); } protected  DefaultMethodCall(List<TypeDescription> prioritizedInterfaces); }
DefaultMethodCall implements Implementation { public static Implementation prioritize(Class<?>... prioritizedInterface) { return prioritize(new TypeList.ForLoadedTypes(prioritizedInterface)); } 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 prioritize(Class<?>... prioritizedInterface) { return prioritize(new TypeList.ForLoadedTypes(prioritizedInterface)); } 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);  }