Is there a #capitalizeAndUnderscore method available for getter/setter templates?


I need something like this in a getter template:

* {@value #$StringUtil.capitalizeAndUnderscore($}

similar to the `capitalizeAndUnderscore` from the live templates builtins:

I have found this by searching around:

I think this is the class in use in the getter/setter templates, but I have no way to be sure.

Is there a method that can do what I want? Is there a way to extend the `StringUtil` class in use here?


The StringUtil is correct, but there is no such method there. No, it's impossible to extend the velocity variable in any way. Could you please submit a request you



Please sign in to leave a comment.