@Test void getAllSpoonInterfaces() { final List<Class<?>> inter = spoonCodeInstrument.getAllSpoonInterfaces(CtStatement.class).collect(Collectors.toList()); assertThat(inter).containsExactlyInAnyOrder(CtCodeElement.class, CtElement.class, FactoryAccessor.class, CtVisitable.class, CtQueryable.class, SourcePositionHolder.class); }
Stream<Class<?>> getAllSpoonInterfaces(final Class<?> cl) { return Stream.concat( getDirectSpoonInterfaces(cl), getDirectSpoonInterfaces(cl) .map(inter -> getAllSpoonInterfaces(inter)) .flatMap(st -> st) ).distinct(); }
SpoonCodeInstrument extends JfxInstrument implements Initializable { Stream<Class<?>> getAllSpoonInterfaces(final Class<?> cl) { return Stream.concat( getDirectSpoonInterfaces(cl), getDirectSpoonInterfaces(cl) .map(inter -> getAllSpoonInterfaces(inter)) .flatMap(st -> st) ).distinct(); } }
SpoonCodeInstrument extends JfxInstrument implements Initializable { Stream<Class<?>> getAllSpoonInterfaces(final Class<?> cl) { return Stream.concat( getDirectSpoonInterfaces(cl), getDirectSpoonInterfaces(cl) .map(inter -> getAllSpoonInterfaces(inter)) .flatMap(st -> st) ).distinct(); }  }
SpoonCodeInstrument extends JfxInstrument implements Initializable { Stream<Class<?>> getAllSpoonInterfaces(final Class<?> cl) { return Stream.concat( getDirectSpoonInterfaces(cl), getDirectSpoonInterfaces(cl) .map(inter -> getAllSpoonInterfaces(inter)) .flatMap(st -> st) ).distinct(); }  @Override void initialize(final URL url, final ResourceBundle res); }
SpoonCodeInstrument extends JfxInstrument implements Initializable { Stream<Class<?>> getAllSpoonInterfaces(final Class<?> cl) { return Stream.concat( getDirectSpoonInterfaces(cl), getDirectSpoonInterfaces(cl) .map(inter -> getAllSpoonInterfaces(inter)) .flatMap(st -> st) ).distinct(); }  @Override void initialize(final URL url, final ResourceBundle res);  }