Class J.Literal.UnicodeEscape

java.lang.Object
org.openrewrite.java.tree.J.Literal.UnicodeEscape
Enclosing class:
J.Literal

public static class J.Literal.UnicodeEscape extends Object
See jls-3.3.

Unmatched UTF-16 surrogate pairs (composed of two escape and code point pairs) are unserializable by technologies like Jackson. So we separate and store the code point off and reconstruct the escape sequence when printing later.

We only escape unicode characters that are part of UTF-16 surrogate pairs. Others are generally treated well by tools like Jackson.

  • Constructor Details

    • UnicodeEscape

      public UnicodeEscape()