Is this "overload method" refactoring implemented?

Often I have need to do either of two things
- take an existing method and wrap it with new overloaded method with some
default parameters
- take an existing method, add some extra parameters and wrap it in new
overloaded method matching original method signature
- variations of the two above where wrapped method getas renamed and made
private and its parameters gets rearranged


Right now it is always a manual cut an paste thing for me. As far as I know
there is nothing like this available at the moment or did I miss it? I wish
it could be done as a refactoring.

Would it be useful for you?
What do you think?

Thanks,
Alex


1 comment

If you do the "Change Signature" refactoring there is a radio button at
the top of the dialog to select "Delegate via overloading method"...

N.

Alex Roytman wrote:

Often I have need to do either of two things
- take an existing method and wrap it with new overloaded method with some
default parameters
- take an existing method, add some extra parameters and wrap it in new
overloaded method matching original method signature
- variations of the two above where wrapped method getas renamed and made
private and its parameters gets rearranged


Right now it is always a manual cut an paste thing for me. As far as I know
there is nothing like this available at the moment or did I miss it? I wish
it could be done as a refactoring.

Would it be useful for you?
What do you think?

Thanks,
Alex

0

Please sign in to leave a comment.