Suppose that I have a simple annotation:
@MyAnnotation(value=<SomeString>)
and an enum:
enum Days {
MONDAY...
}
I cant use this annotation like this:
@MyAnnotation(value=Days.MONDAY.name())
private class SomeClass {
//some code
}
This code will fail saying that "it must be a compiled time constant". I do understand why this happens and I am aware of the JSL part about compiled time constants.
My question is why and what is the reasoning behind not making an enum a compiled time constant according to the specification. It's not like you can change that enum name...
EDIT for Kumar
private static final class Test {
public static final String complete = "start" + "finish";
}