For MVC model classes, my setters look like:
enum BoundProperty {FIELD_NAME, ...}
private Type fieldName;
public setFieldName(Type newValue) {
Type oldValue = fieldName;
fieldName = newValue;
firePropertyChange(BoundProperty.FIELD_NAME, oldValue, newValue);
}
Given a field, can this output be produced from the autogenerated setter? If not is there a way to get this output from a template?
The output should CamelCase the field name to produce the method name, so fieldName generates setFieldName() and Uppercase the field name to produce the property enum.
So fieldName generates FIELD_NAME
(or FIELDNAME
would work too).