constants in java annotations
I've got the following annotation: @javax.ws.rs.DefaultValue("212") Long bits
I want to reuse the "final static" values that are already defined as the
argument for the annotation. Like this one:
final static final long PERMISSIONS = PERMISSION_A | PERMISSION_B; //this
is 212
But since annotations require a "constant expression", it's not possible
to go:
@DefaultValue(String.valueof(PERMISSIONS)) Long bits
Is there any way to accomplish this?
No comments:
Post a Comment