How about just facility for movement of static methods? It would be useful for
pulling functionality out into utility classes.
This would have far less issues though there would still be the question of whether to
move accessed static methods and fields.
Paul.
"Michael Kirby"
<[EMAIL PROTECTED]> To:
[EMAIL PROTECTED]
Sent by: cc:
[EMAIL PROTECTED] Subject: Re: [Eap-features]
Re: Refactory: Replace Inheritance with Delegation
tbrains.com
29/07/2002 16:39
Please respond to
eap-features
I know that I have heard this before, but I still must ask.
Let me walk through the issues.
1) Method contains access to public variables. - No issue, because we just access the
public
variables from the destination.
2) Method contains access to private variables - We need to either create
getter/setters in the
source class so they destination class can reference them, or move / copy the state
variables
to the destination class. If we copy them, then how are they going to get set
(another method
that hasn't yet been moved?
3) Method contains access to private methods - Make the methods public? For both this
one
and number 1 (and a variation of 2), how do we get a reference to the original object?
It
would seem the user would need to describe (somehow) the construction of the
destination
class.
4) Method contains access to protected variables or methods in one of the super
classes -
This is a good one. What do you do here? I certainly wouldn't want to create
getters/setters
to a variable that is in a superclass.
There are probabaly some other cases that I haven't considered.
When looking at this, it seems to me that even though I would love to have this
feature, that it
is not reasonable to provide an automated solution for it. (that's too bad, because it
was my
intention when starting this mailnot to argue for that :-)
Mike
On 29 Jul 2002 at 19:10, Mike Aizatsky wrote:
> > Move method
>
> It is quite easily performed with the following refactorings: make
> method static, move static method, introduce parameter. The reason why
> move method is not implemented is simple: the amount of information,
> IDEA should ask a user when performing the method is _enormous_. So it
> won't be very practical to use. (Try thinking about several
> possibilities in moving the method).
---
[EMAIL PROTECTED]
To obtain my PGP public key, mail "SEND PUB KEY" in the
subject to "[EMAIL PROTECTED]"
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorized copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features