JTypeSymbol extends JSymbol implements Symbol.TypeSymbol { @Override public Collection<Symbol> memberSymbols() { if (memberSymbols == null) { memberSymbols = convertMemberSymbols(); } return memberSymbols; } 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 memberSymbols() { JavaTree.CompilationUnitTreeImpl cu = test("class C { int f; C() {} class N {} }"); ClassTreeImpl c = (ClassTreeImpl) cu.types().get(0); VariableTreeImpl f = (VariableTreeImpl) c.members().get(0); MethodTreeImpl m = (MethodTreeImpl) c.members().get(1); ClassTreeImpl n = (ClassTreeImpl) c.members().get(2); assertThat(cu.sema.typeSymbol(c.typeBinding).memberSymbols()) .containsOnly( cu.sema.variableSymbol(f.variableBinding), cu.sema.methodSymbol(m.methodBinding), cu.sema.typeSymbol(n.typeBinding) ); }