Suggestion for @new annotation.

92 views
Skip to first unread message

lyassa

unread,
May 21, 2022, 1:37:23 PM5/21/22
to Project Lombok
Some class names are quite long as in the example below:
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(userName, passWord)

Is it possible to have an @new annotation like below:
UsernamePasswordAuthenticationToken token = @new (userName, passWord)

Mat Jaggard

unread,
May 21, 2022, 2:11:41 PM5/21/22
to project-lombok
This is solved the other way around by having val (from Lombok although modern versions of Java have var built in now)

var token = new UsernamePasswordAuthenticationToken(userName, passWord)


--
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/edf5ff5d-50b6-476b-a9e1-9f74a1c47147n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages