RuntimeType implements InferredType { @Override public boolean canOnlyBe(String typeName) { return typeName.equals(typeClass.fullyQualifiedName()); } 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_canOnlyBe() { assertThat(new RuntimeType(a).canOnlyBe("a")).isTrue(); assertThat(new RuntimeType(b).canOnlyBe("a")).isFalse(); }