JTypeSymbol extends JSymbol implements Symbol.TypeSymbol { @Override public List<Type> interfaces() { if (interfaces == null) { interfaces = sema.types(typeBinding().getInterfaces()); } return interfaces; } JTypeSymbol(JSema sema, ITypeBinding typeBinding); @CheckForNull @Override Type superClass(); @Override List<Type> interfaces(); @Override Collection<Symbol> memberSymbols(); @Override Collection<Symbol> lookupSymbols(String name); @Nullable @Override ClassTree declaration();  }
@Test void interfaces() { JavaTree.CompilationUnitTreeImpl cu = test("interface I { } class C implements I { }"); ITypeBinding i = Objects.requireNonNull(((ClassTreeImpl) cu.types().get(0)).typeBinding); ITypeBinding c = Objects.requireNonNull(((ClassTreeImpl) cu.types().get(1)).typeBinding); assertThat(cu.sema.typeSymbol(i).interfaces()) .isEmpty(); assertThat(cu.sema.typeSymbol(c).interfaces()) .containsOnly(cu.sema.type(i)); }