RuntimeType implements InferredType { @Override public Optional<Symbol> resolveDeclaredMember(String memberName) { return resolveMember(memberName); } RuntimeType(ClassSymbol typeClass); @Override boolean isIdentityComparableWith(InferredType other); @Override boolean canHaveMember(String memberName); @Override boolean declaresMember(String memberName); @Override Optional<Symbol> resolveMember(String memberName); @Override Optional<Symbol> resolveDeclaredMember(String memberName); @Override boolean canOnlyBe(String typeName); @Override boolean canBeOrExtend(String typeName); @Override boolean isCompatibleWith(InferredType other); boolean mustBeOrExtend(String fullyQualifiedName); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); ClassSymbol getTypeClass();  }
@Test public void test_resolveDeclaredMember() { ClassSymbolImpl typeClass = new ClassSymbolImpl("x", "x"); SymbolImpl foo = new SymbolImpl("foo", "foo"); typeClass.addMembers(Collections.singletonList(foo)); RuntimeType runtimeType = new RuntimeType(typeClass); assertThat(runtimeType.resolveDeclaredMember("foo")).contains(foo); assertThat(runtimeType.resolveDeclaredMember("bar")).isEmpty(); }