RuntimeType implements InferredType { @Override public int hashCode() { return Objects.hash(typeClass.name(), typeClass.fullyQualifiedName(), typeClassSuperClassesFQN(), typeClassMembersFQN()); } 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_hashCode() { RuntimeType aType = new RuntimeType(a); assertThat(aType.hashCode()).isEqualTo(new RuntimeType(a).hashCode()); assertThat(aType.hashCode()).isNotEqualTo(new RuntimeType(b).hashCode()); RuntimeType x = new RuntimeType(new ClassSymbolImpl("X", null)); RuntimeType y = new RuntimeType(new ClassSymbolImpl("Y", null)); assertThat(x.hashCode()).isNotEqualTo(y.hashCode()); }