@@ -658,9 +658,12 @@ public static String getTypeDisplayName(Project project, Set<String> types) {
658658 }
659659
660660 public static boolean isPropertyShortcutMethod (Method method ) {
661+ return isPropertyShortcutMethod (method .getName ());
662+ }
661663
662- for (String shortcut : PROPERTY_SHORTCUTS ) {
663- if (method .getName ().startsWith (shortcut ) && method .getName ().length () > shortcut .length ()) {
664+ public static boolean isPropertyShortcutMethod (String methodName ) {
665+ for (String shortcut : PROPERTY_SHORTCUTS ) {
666+ if (methodName .startsWith (shortcut ) && methodName .length () > shortcut .length ()) {
664667 return true ;
665668 }
666669 }
@@ -669,9 +672,8 @@ public static boolean isPropertyShortcutMethod(Method method) {
669672 }
670673
671674 public static boolean isPropertyShortcutMethodEqual (String methodName , String variableName ) {
672-
673- for (String shortcut : PROPERTY_SHORTCUTS ) {
674- if (methodName .equalsIgnoreCase (shortcut + variableName )) {
675+ for (String shortcut : PROPERTY_SHORTCUTS ) {
676+ if (methodName .equalsIgnoreCase (shortcut + variableName )) {
675677 return true ;
676678 }
677679 }
@@ -688,11 +690,13 @@ public static boolean isPropertyShortcutMethodEqual(String methodName, String va
688690 */
689691 @ NotNull
690692 public static String getPropertyShortcutMethodName (@ NotNull Method method ) {
691- String methodName = method .getName ();
693+ return getPropertyShortcutMethodName (method .getName ());
694+ }
692695
693- for (String shortcut : PROPERTY_SHORTCUTS ) {
696+ public static String getPropertyShortcutMethodName (@ NotNull String methodName ) {
697+ for (String shortcut : PROPERTY_SHORTCUTS ) {
694698 // strip possible property shortcut and make it lcfirst
695- if ( method . getName (). startsWith (shortcut ) && method . getName () .length () > shortcut .length ()) {
699+ if ( methodName . startsWith (shortcut ) && methodName .length () > shortcut .length ()) {
696700 methodName = methodName .substring (shortcut .length ());
697701 return Character .toLowerCase (methodName .charAt (0 )) + methodName .substring (1 );
698702 }
0 commit comments