boolean (@NotNull Type type, @NotNull String typeName) { int genericPos = typeName.indexOf('<'); if (genericPos > -1) { typeName = typeName.substring(0, genericPos); } return type.name().replace('$', '.').equals(typeName.replace('$', '.')); }