@Test void shouldEscapeContent() { StringLiteral literal = new StringLiteral("A\\B\\\\Ca'bc123\\"); assertThat(literal.asString()).isEqualTo("'A\\\\B\\\\\\\\Ca\\'bc123\\\\'"); }
@Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); @Override String asString(); }
StringLiteral extends Literal<CharSequence> { @Override public String asString() { final Optional<String> escapedContent = escapeString(getContent()); return String.format(Locale.ENGLISH, QUOTED_LITERAL_FORMAT, escapedContent.orElse("")); } StringLiteral(CharSequence content); @Override String asString();  }