There are a lot of different ways to implement the toString() method. It
would have to be highly customizable to keep everyone happy. Classes within
classes could get confusing to display as well. For example:
class Foo {
int a;
String b;
public String toString(){
StringBuffer ret = new StringBuffer();
ret.append("[" + super.toString() + " ");
ret.append("a=" + a + ",");
ret.append("b=" + b + "]");
return ret.toString();
}
}
class Bar {
double c;
Foo d;
public String toString(){
StringBuffer ret = new StringBuffer();
ret.append("[" + super.toString() + " ");
ret.append("c=" + c + ",");
ret.append("d=" + d + "]");
return ret.toString();
}
}
-----Original Message-----
From: Berman, Andrew [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 27, 2001 11:14 AM
To: [EMAIL PROTECTED]
Subject: [Eap-features] Generate toString()
Hello All,
I think all of us could benefit from IntelliJ IDEA generating a
toString(0 for us. It would be like the Getter/Setter where you could
select the variables to be displayed and then it writes a toString for
you using a StringBuffer. Any thoughts?
--Andrew Berman
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features