Hi, All!
Is it possible to somehow (live templates, refactoring etc.) to
automatically create "toString"
as a method, which will convert all data members of class to String object?
That may be very useful in development stage.
Here is an example (for short -  I'll use "+" instead of StringBuffer) :
public class Test
{
    private int i;
    private Object o;
    private String str;
    private long timestamp;

   public String toString()
   {
        String res = "int i = " + i;
        res +="Object o = " + ((o == null) ? null : o.toString()) + "\n";
        res +="String str = " + str + "\n";
        res +="long timestamp = " + timestamp + "\n";
        return res;
    }
}




_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to