Often I expose getters and setters for my class that don't directly
correlate to a variable. For example, I might have a class like this:
class MyClass {
private String[] lines;
public String[] getLines() {
return lines;
}
public void setLines(String[] newLines) {
this.lines = newLines;
}
public List getLinesList() {
return Arrays.asList(lines);
}
public void setLinesList(List newLinesList) {
this.lines = (String[])lines.toArray(new String[0]);
}
}
The easiest way for me to handle the second getter/setter pair would be if
Idea had an "Introduce Property" refactoring where I can supply the property
name and its type. Then I could just fill in the implementation. Right now
I'm forced to add a field to my class (List linesList) and wrap the
getter/setter around it. Then I have to remove the field and the
implementations in the getter/setter. That seems like far too much trouble.
:)
Kirk
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features