> -----Original Message-----
> From: Magesh Umasankar [mailto:[EMAIL PROTECTED]
> From: "Stephane Bailliez" <[EMAIL PROTECTED]>
>
> > It is not dramatic because it's a bean setter, but the I prefer
> >
> > public void setFile(File value) {
> > file = value;
> > }
>
> This is nice, but when you have multiple arguments,
> you would end up with value1, value2, etc, or
> fileValue, isOverwriteValue, etc? My guess is
> you would choose fileValue over value1. So,
> that makes it Value a suffix of the argument
> which is not very different from having
> 'a' as the prefix of an argument.
No because you will have individual setters like this:
;-)
class Foo {
private int foo;
private int bar;
private int foobar;
public final void setAll(int foo, int bar, int foobar){
setFoo(foo);
setBar(bar);
setFooBar(foobar);
}
protected final void setFoo(int value){ foo = value; }
protected final void setBar(int value){ bar = value; }
protected final void setFooBar(int value){ foobar = value; }
}
> > though my preferences goes to the
> > invalid-becoz-not-following-sun-coding-guidelines:
> >
> > public void setFile(File file) {
> > _file = file;
> > }
>
> Problem is when file is already a protected
> variable. We cannot rename that to _file in Ant1
> while at the same time be consistent in naming.
Yep.
> > It makes a clear distinction. :)
> >
>
> I agree it does, but so does the following ;-)
>
> this.file = file;
yes but _file != file while this.file == file in some cases like fi1e :-)
If I want to put the mess in source code, just replace l by 1.
That's the tactical nuclear weapon of source obfuscation. :)
> Though I made this change, I was doing it just
> because QA complained - otherwise, I wouldn't have.
> As this seems to be snowballing into issues,
> I will revert the commit and lets see where the
> discussion heads...
>
> > btw FYI the next version of IDEA codename Ariadna (Ariadne)
> will make the
> > distinction between instance, formal parameter and local variable.
You may want to subscribe to the EAP program
http://www.intellij.com/eap
Stephane
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>