in javac-ast-extension/src/org/jetbrains/jps/javac/ast/JavacTreeRefScanner.java [334:341]
private static boolean isTypeCorrespondsToElement(TypeMirror type, TypeElement baseClass) {
if (type != null && type.getKind() != TypeKind.NONE) {
DeclaredType superClass = (DeclaredType)type;
Element superClassElement = superClass.asElement();
if (superClassElement == baseClass) return true;
}
return false;
}