Class CodeGenUtils

java.lang.Object
com.google.gwt.codegen.server.CodeGenUtils

public class CodeGenUtils extends Object
Helper class for code generators.
  • Method Details

    • asStringLiteral

      public static String asStringLiteral(String literal)
      Produce a string which represents a string literal in Java source, including null values.
      Parameters:
      literal -
      Returns:
      Java source representation of the string literal
    • escape

      public static String escape(String unescaped)
      Escapes string content to be a valid string literal.
      Parameters:
      unescaped -
      Returns:
      an escaped version of unescaped, suitable for being enclosed in double quotes in Java source