K2 IDE: port UsePropertyAccessSyntaxIntention – turn it to the inspection

KTIJ-28409 K2 IDE: port UsePropertyAccessSyntaxIntention

Merge-request: IJ-MR-125578
Merged-by: Victoria Petrakovich <Victoria.Petrakovich@jetbrains.com>

GitOrigin-RevId: bca92cabd37d3d9f926cef4afba58962f586a89e
This commit is contained in:
Victoria.Petrakovich
2024-03-19 17:04:03 +00:00
committed by intellij-monorepo-bot
parent bf704183ea
commit c086c60c1e
195 changed files with 3394 additions and 53 deletions

View File

@@ -456,6 +456,14 @@ public class PropertyUtilBase {
return checkPrefix(methodName, SET_PREFIX);
}
public static boolean isGetterName(@NotNull String methodName) {
return checkPrefix(methodName, GET_PREFIX);
}
public static boolean isIsGetterName(@NotNull String methodName) {
return checkPrefix(methodName, IS_PREFIX);
}
@Nullable
public static String getPropertyName(@NotNull PsiMethod method) {
return getPropertyName(method, false);