@Test public void projection() { ModelLoader loader = generate(); Class<?> a = loader.modelType("A"); Class<?> b = loader.modelType("B"); Class<?> c = loader.modelType("C"); Class<?> d = loader.modelType("D"); assertThat(a.getInterfaces(), not(includes(b))); assertThat(a.getInterfaces(), not(includes(c))); assertThat(a.getInterfaces(), not(includes(d))); assertThat(b.getInterfaces(), includes(a)); assertThat(b.getInterfaces(), not(includes(c))); assertThat(b.getInterfaces(), not(includes(d))); assertThat(c.getInterfaces(), not(includes(a))); assertThat(c.getInterfaces(), not(includes(b))); assertThat(c.getInterfaces(), not(includes(d))); assertThat(d.getInterfaces(), not(includes(a))); assertThat(d.getInterfaces(), includes(b)); assertThat(d.getInterfaces(), includes(c)); }
@Override public List<Type> getInterfaces(EmitContext context, ModelDeclaration model) { return collect(context, model).stream() .map(context::resolve) .collect(Collectors.toList()); }
ProjectionDriver extends JavaDataModelDriver { @Override public List<Type> getInterfaces(EmitContext context, ModelDeclaration model) { return collect(context, model).stream() .map(context::resolve) .collect(Collectors.toList()); } }
ProjectionDriver extends JavaDataModelDriver { @Override public List<Type> getInterfaces(EmitContext context, ModelDeclaration model) { return collect(context, model).stream() .map(context::resolve) .collect(Collectors.toList()); }  }
ProjectionDriver extends JavaDataModelDriver { @Override public List<Type> getInterfaces(EmitContext context, ModelDeclaration model) { return collect(context, model).stream() .map(context::resolve) .collect(Collectors.toList()); }  @Override List<Type> getInterfaces(EmitContext context, ModelDeclaration model); }
ProjectionDriver extends JavaDataModelDriver { @Override public List<Type> getInterfaces(EmitContext context, ModelDeclaration model) { return collect(context, model).stream() .map(context::resolve) .collect(Collectors.toList()); }  @Override List<Type> getInterfaces(EmitContext context, ModelDeclaration model);  }