Of course! How did I miss this one?
My most wnated refactoring list
is
- Extract Class/Inline Class
http://www.refactoring.com/catalog/extractClass.html / http://www.refactoring.com/catalog/inlineClass.html - Move method
http://www.refactoring.com/catalog/moveMethod.html - Replace Inheritance with Delegation
http://www.refactoring.com/catalog/replaceInheritanceWithDelegation.html - Replace Constructor with Factory Method
http://www.refactoring.com/catalog/replaceConstructorWithFactoryMethod.html
This would replace all new XXX() by XXX.newInstance().
My nice to have
- Encapsulate Collection (mentioned several times in
other threads)
http://www.refactoring.com/catalog/encapsulateCollection.html - Replace Method with Method Object
http://www.refactoring.com/catalog/replaceMethodWithMethodObject.html
Just in case you have a method big enough to be its own object. - Replace Data Value with Object
http://www.refactoring.com/catalog/replaceDataValueWithObject.html - Replace Parameter with
Method
http://www.refactoring.com/catalog/replaceParameterWithMethod.html
"Bertel" <[EMAIL PROTECTED]> wrote in message
aht5o8$sio$[EMAIL PROTECTED]">news:aht5o8$sio$[EMAIL PROTECTED]...
> I realy would like "Replace
Inheritance with Delegation" refactory.> http://www.refactoring.com/catalog/replaceInheritanceWithDelegation.html
>
> Joshua Bloch describe in his book Effective Java some of the benifits of
> using composition over inheritance, but I find it somtime a pain to write
> all the forwarding methods.
>
>
> Example:
>
> class Test extends ArrayList
> {
> ...
> }
>
> =>
>
> class Test implements List, Cloneable, java.io.Serializable
> {
> private ArrayList _arrayList = new ArrayList();
>
> public void trimToSize() {
> _arrayList.trimToSize();
> }
>
> ...
> }
>
>
> Michael Bertelsen
> SPSS Inc.
>
>
