Java 类org.apache.logging.log4j.core.util.OptionConverter 实例源码

项目:logging-log4j2    文件:LiteralPatternConverter.java   
/**
 * Create a new instance.
 *
 * @param config The Configuration.
 * @param literal string literal.
 * @param convertBackslashes if {@code true}, backslash characters are treated as escape characters and character
 *            sequences like "\" followed by "t" (backslash+t) are converted to special characters like '\t' (tab).
 */
public LiteralPatternConverter(final Configuration config, final String literal, final boolean convertBackslashes) {
    super("Literal", "literal");
    this.literal = convertBackslashes ? OptionConverter.convertSpecialChars(literal) : literal; // LOG4J2-829
    this.config = config;
    substitute = config != null && literal.contains("${");
}