I would like to add a new method to TreeUtilities, isCompileTimeConstantExpression to check constantness of an expression as per JLS 15.28.
I will attach a proposed patch once I have a bug number.
Created attachment 112592 [details]
Proposed API change.
Thanks for review:
Integrated into 'main-golden'
User: Jan Lahoda <firstname.lastname@example.org>
Log: #204435: adding TreeUtilities.isCompileTimeConstantExpression.