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

Reply via email to