Now I'm doing this with a live template, but if IDEA would have an
option, it would be fine, too.
Tom
+1
On Tue, 25 Jun 2002 18:41:13 +0100, Nathan Brown <[EMAIL PROTECTED]>
wrote:
>It would be great if the "Encapsulate fields" refactoring could also
>support lazy initialization when an initialization statement exists at
>the field declaration and the field is of an object type.
>
>Using this option, the existing initialization would be moved into the
>get method so that :
>
>private Object _value = new ExpensiveObject();
>
>would be transformed to
>
>private Object _value;
>
>public Object getValue()
>{
> if (_value == null) {
> _value = new ExpensiveObject();
> }
> return value;
>}
>
>N.
>
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features