Remove Suffix from Getter and Setter option

已查看 122 次
跳至第一个未读帖子

Dennis

未读,
2021年8月19日 13:30:332021/8/19
收件人 Project Lombok
A lot of programmers use suffixes for class member variables like 

_classMember or
mClassMember

generating a @Getter would return getMClassMember but we do not want the m inside the @Getter. 

Wouldn't it be a nice feature to have an option to remove those suffixed from out Getters?

Chris Becker

未读,
2021年8月20日 11:05:222021/8/20
收件人 project...@googlegroups.com
Yes, would be nice for Lombok, too.
Eclipse and some other IDEs already handle that reliably when auto-creating code.
But I guess the user would have to set those settings himself, because converting any mXxxx (with X being any capital letter) might also do something really really unwanted.
Also remember capitalization and acronyms...

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/a7f71ea9-6271-46d8-971f-6c4ef881e4c5n%40googlegroups.com.


--
Christian Becker
+49.176.2238 9755
chris.b...@gmail.com

Thorsten Glaser

未读,
2021年8月20日 16:58:102021/8/20
收件人 project...@googlegroups.com
On Fri, 20 Aug 2021, Chris Becker wrote:

> > A lot of programmers use suffixes for class member variables like
> >
> > _classMember or
> > mClassMember

But why? That makes no sense, especially as the slots are already
namespaced-ish by beginning with a lowercase letter in Java™.

> But I guess the user would have to set those settings himself, because
> converting any mXxxx (with X being any capital letter) might also do
> something really really unwanted.

Yes, please do make this opt-in. I can see 'mDNSResponder' explode,
and possibly others.

bye,
//mirabilos
--
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

*************************************************

Mit dem tarent-Newsletter nichts mehr verpassen: www.tarent.de/newsletter

*************************************************
回复全部
回复作者
转发
0 个新帖子