/** * Computes the method name that should be used to write the property value. * * @param fieldName the name of the property * @param isStatic true if the property is static * @param cs the CodeSyle to use * @return the setter name */ @NonNull public static String computeSetterName(CharSequence fieldName, boolean isStatic, CodeStyle cs) { StringBuilder name = new StringBuilder(getCapitalizedName(removeFieldPrefixSuffix(fieldName, isStatic, cs))); name.insert(0, "set"); //NOI18N return name.toString(); }
/** * Computes the method name that should be used to read the property value. * * @param fieldName the name of the property * @param isBoolean true if the property is of boolean type * @param isStatic true if the property is static * @param cs the CodeSyle to use * @return the getter name */ @NonNull public static String computeGetterName(CharSequence fieldName, boolean isBoolean, boolean isStatic, CodeStyle cs) { StringBuilder sb = new StringBuilder(getCapitalizedName(removeFieldPrefixSuffix(fieldName, isStatic, cs))); sb.insert(0, isBoolean ? "is" : "get"); //NOI18N String getterName = sb.toString(); return getterName; }
sb.append(capitalize ? getCapitalizedName(name) : name);