Feture suggestion: @SelfConstant

5 views
Skip to first unread message

Roger Wernersson

unread,
7:01 AM (14 hours ago) 7:01 AM
to Project Lombok
Instead of adding a constant of the class itself

public record MyCleverClass
{
    public static final SOMETHING_USEFUL = new MyCleverClass("something useful");
}

I would like to go

public record MyCleverClass
{
    @SelfConstant SOMETHING_USEFUL("something useful");
}

Is that possible?

Jan Materne

unread,
7:50 AM (13 hours ago) 7:50 AM
to project...@googlegroups.com
With enum?

public enum MyCleverClass
{
     SOMETHING_USEFUL("something useful");
}



Jan

--
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 visit https://groups.google.com/d/msgid/project-lombok/d09d93bc-e196-4947-a75e-80a983d2a20cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages