+1 for the 'this'.

I am not sure about the local ClassName prefix but if this is an option, we
can always
turn it off so I don't see any harm here.

Also, our style is to use 'final' unless the value is *intended* to be
changed. A setter
looks like:

public void setXyz(final Xyz xyz)
{
  this.xyz = xyz;
}

This also applies to method and constructor parameters.

Tal

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Vollmer, Thomas -
> CannonSA
> Sent: Tuesday, October 23, 2001 3:54 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [Eap-features] Insert Setter
>
>
> Also, why do setters use "this." and getters don't?
> This also applies to "Encapsulate fields" refactoring.
>
> I'd like to have "this." in both getters and setters.
> If it's a static member that's set or gotten, I use
> "ClassName.staticMemberName = staticMemberName;" and
> "return ClassName.staticMemberName;" respectively.
>
> It's very verbose, I know, but I like it that way :-)
>
> -Thomas
>
> > -----Original Message-----
> > From: Kirk Woll [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 23, 2001 2:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Eap-features] Insert Setter
> >
> >
> > I prefer the parameter for my set methods to be in the style
> > "new" + the
> > property name.  i.e.
> >
> > public void setName(String newName) {
> >   this.name = newName;
> > }
> >
> > rather than
> >
> > public void setName(String name) {
> >   this.name = name;
> > }
> >
> > Can this be made an option?
> >
> > Kirk
> >
> >
> > _______________________________________________
> > Eap-features mailing list
> > [EMAIL PROTECTED]
> > http://www.intellij.com/mailman/listinfo/eap-features
> >
>
> ************************************
> If this email is not intended for you, or you are not responsible for the
> delivery of this message to the addressee, please note that this
> message may
> contain ITT Privileged/Proprietary Information.  In such a case,
> you may not
> copy or deliver this message to anyone.  You should destroy this
> message and
> kindly notify the sender by reply email.  Information contained in this
> message that does not relate to the business of ITT is neither endorsed by
> nor attributable to ITT.
> ************************************
>
>
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-features


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to