optaplanner-core/src/main/java/org/optaplanner/core/impl/domain/common/ReflectionHelper.java
public static String getGetterPropertyName(Member member) {
        if (member instanceof Field) {
            return member.getName();
        } else if (member instanceof Method) {
            String methodName = member.getName();
            for (String prefix : PROPERTY_ACCESSOR_PREFIXES) {
                if (methodName.startsWith(prefix)) {
                    return decapitalizePropertyName(methodName.substring(prefix.length()));
                }
            }
        }
        return null;
    }
public static String getGetterPropertyName(Member member) {
        if (member instanceof Field) {
            return member.getName();
        } else if (member instanceof Method) {
            String methodName = member.getName();
            for (String prefix : PROPERTY_ACCESSOR_PREFIXES) {
                if (methodName.startsWith(prefix)) {
                    return decapitalizePropertyName(methodName.substring(prefix.length()));
                }
            }
        }
        return null;
    }
public static String getGetterPropertyName ( Member member ) { if ( member instanceof Field ) { return member . getName ( ) ; } else if ( member instanceof Method ) { String methodName = member . getName ( ) ; for ( String prefix : PROPERTY_ACCESSOR_PREFIXES ) { if ( methodName . startsWith ( prefix ) ) { return decapitalizePropertyName ( methodName . substring ( prefix . length ( ) ) ) ; } } } return null ; }
Returns the JavaBeans property name of the given member.
@param member never null
@return null if the member is neither a field nor a getter method according to the JavaBeans standard
Returns the JavaBeans property name of the given member .