Returns a class name from the given symbol.
Returns a class name from the given symbol.
If useBackticks:
This is basically capitalizing the first character that
can be capitalized. If none, then a U is prepended.
Otherwise:
Since underscores are specially used in generated code,
this method camelizes the symbol in case of any underscores.
Returns a valid scala identifier from the given symbol:
Returns a valid scala identifier from the given symbol:
- encloses the symbol in backticks if the symbol is a scala reserved word; - appends an underscore if the symbol corresponds to a no-arg method in scope; - otherwise:
javaGenerator.javaIdentifier(symbol)
By default scalaIdentifier uses underscores as needed for various cases that need translation of the given identifier to make it valid Scala. Similarly, getClassName also does some related logic.
With this flag set to true, both methods will change their logic to use backticks instead of replacing or removing the characters that would make the resulting identifiers invalid.