Every case label must be a "constant expression". What is "constant expression" is defined in Java Language Standard, §15.28 Constant Expressions:
A compile-time constant expression is an expression denoting a value of primitive type or a String that does not complete abruptly and is composed using only the following:
- Literals of primitive type and literals of type String
...
- Simple names that refer to constant variables
No method calls are listed there, so method call result cannot be the constant expression even if the method is trivial. But "Simple names that refer to constant variables" are listed here, so reference to the constant variable is also a constant.