I use tapestry 5 as my choice of web framework. Tapestry allows me to define symbols in the configure class and inject symbols into other components.
for example,
It doesn't seem possible w/ scala versions 2.8.1.final, 2.8.2.final, or 2.9.1.final (the result was the same with all):
object Constant { val UNCHECKED = "unchecked" }
class Test {
@SuppressWarnings(Array(Constant.UNCHECKED))
def test: Unit = println("testing.. 1, 2... 3")
}
.
:7: error: annotation argument needs to be a constant; found: Constant.UNCHECKED
@SuppressWarnings(Array(Constant.UNCHECKED))