Class JvmSyntax
- Namespace
- TypedRest.CodeGeneration.Jvm.Model
- Assembly
- TypedRest.CodeGeneration.Jvm.dll
Syntax helpers shared by the Java and Kotlin generators.
public static class JvmSyntax
- Inheritance
-
objectJvmSyntax
Methods
Identifier(string)
Returns name as an identifier that is legal in both languages, suffixing reserved words.
public static string Identifier(string name)
Parameters
namestring
Returns
IsReservedWord(string)
Indicates whether word may not be used as an identifier in Java or Kotlin.
public static bool IsReservedWord(string word)
Parameters
wordstring
Returns
Quote(string)
Returns value as a double-quoted string literal, valid in both languages.
public static string Quote(string value)
Parameters
valuestring
Returns
Quote(string, bool)
Returns value as a double-quoted string literal.
public static string Quote(string value, bool escapeDollar)
Parameters
valuestringThe string to quote.
escapeDollarboolEscapes
$as$, which Kotlin requires to keep it from starting a string template and Java rejects as an unknown escape sequence.