org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar()方法的一些代码示例,展示了Util.appendEscapedChar()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.appendEscapedChar()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.util.Util
类名称:Util
方法名:appendEscapedChar

Util.appendEscapedChar介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private static void escapeChar(StringBuffer buffer, char c) {
  org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, false);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private static void escapeChar(StringBuffer buffer, char c) {
  org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, false);
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private static void escapeChar(StringBuffer buffer, char c) {
  org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, false);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

static String decodeStringValue(char[] chars) {
  StringBuffer buffer = new StringBuffer();
  for (int i = 0, max = chars.length; i < max; i++) {
    char c = chars[i];
    org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, true);
  }
  return buffer.toString();
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public StringBuffer printExpression(int indent, StringBuffer output) {
  // handle some special char.....
  output.append('\"');
  for (int i = 0; i < this.source.length; i++) {
    Util.appendEscapedChar(output, this.source[i], true);
  }
  output.append('\"');
  return output;
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

static String decodeStringValue(char[] chars) {
  StringBuffer buffer = new StringBuffer();
  for (int i = 0, max = chars.length; i < max; i++) {
    char c = chars[i];
    org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, true);
  }
  return buffer.toString();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

public StringBuffer printExpression(int indent, StringBuffer output) {
  // handle some special char.....
  output.append('\"');
  for (int i = 0; i < this.source.length; i++) {
    Util.appendEscapedChar(output, this.source[i], true);
  }
  output.append('\"');
  return output;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
  // handle some special char.....
  output.append('\"');
  for (int i = 0; i < this.source.length; i++) {
    Util.appendEscapedChar(output, this.source[i], true);
  }
  output.append('\"');
  return output;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public StringBuffer printExpression(int indent, StringBuffer output) {
  // handle some special char.....
  output.append('\"');
  for (int i = 0; i < this.source.length; i++) {
    Util.appendEscapedChar(output, this.source[i], true);
  }
  output.append('\"');
  return output;
}

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

public StringBuffer printExpression(int indent, StringBuffer output) {
  // handle some special char.....
  output.append('\"');
  for (int i = 0; i < this.source.length; i++) {
    Util.appendEscapedChar(output, this.source[i], true);
  }
  output.append('\"');
  return output;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

static String decodeStringValue(char[] chars) {
  StringBuffer buffer = new StringBuffer();
  for (int i = 0, max = chars.length; i < max; i++) {
    char c = chars[i];
    org.eclipse.jdt.internal.compiler.util.Util.appendEscapedChar(buffer, c, true);
  }
  return buffer.toString();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private static char[] displayEscapeCharacters(char[] tokenSource, int start, int end) {
  StringBuffer tokenSourceBuffer = new StringBuffer();
  for (int i = 0; i < start; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  for (int i = start; i < end; i++) {
    char c = tokenSource[i];
    Util.appendEscapedChar(tokenSourceBuffer, c, true);
  }
  for (int i = end; i < tokenSource.length; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  return tokenSourceBuffer.toString().toCharArray();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

private static char[] displayEscapeCharacters(char[] tokenSource, int start, int end) {
  StringBuffer tokenSourceBuffer = new StringBuffer();
  for (int i = 0; i < start; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  for (int i = start; i < end; i++) {
    char c = tokenSource[i];
    Util.appendEscapedChar(tokenSourceBuffer, c, true);
  }
  for (int i = end; i < tokenSource.length; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  return tokenSourceBuffer.toString().toCharArray();
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private static char[] displayEscapeCharacters(char[] tokenSource, int start, int end) {
  StringBuffer tokenSourceBuffer = new StringBuffer();
  for (int i = 0; i < start; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  for (int i = start; i < end; i++) {
    char c = tokenSource[i];
    Util.appendEscapedChar(tokenSourceBuffer, c, true);
  }
  for (int i = end; i < tokenSource.length; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  return tokenSourceBuffer.toString().toCharArray();
}

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

private static char[] displayEscapeCharacters(char[] tokenSource, int start, int end) {
  StringBuffer tokenSourceBuffer = new StringBuffer();
  for (int i = 0; i < start; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  for (int i = start; i < end; i++) {
    char c = tokenSource[i];
    Util.appendEscapedChar(tokenSourceBuffer, c, true);
  }
  for (int i = end; i < tokenSource.length; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  return tokenSourceBuffer.toString().toCharArray();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private static char[] displayEscapeCharacters(char[] tokenSource, int start, int end) {
  StringBuffer tokenSourceBuffer = new StringBuffer();
  for (int i = 0; i < start; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  for (int i = start; i < end; i++) {
    char c = tokenSource[i];
    Util.appendEscapedChar(tokenSourceBuffer, c, true);
  }
  for (int i = end; i < tokenSource.length; i++) {
    tokenSourceBuffer.append(tokenSource[i]);
  }
  return tokenSourceBuffer.toString().toCharArray();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Sets the value of this character literal node to the given character.
 * <p>
 * For example,
 * <pre>
 * CharacterLiteral s;
 * s.setCharValue('x');
 * assert s.charValue() == 'x';
 * assert s.getEscapedValue().equals("\'x\'");
 * </pre>
 * </p>
 *
 * @param value the character value
 */
public void setCharValue(char value) {
  StringBuffer b = new StringBuffer(3);
  b.append('\''); // opening delimiter
  Util.appendEscapedChar(b, value, false);
  b.append('\''); // closing delimiter
  setEscapedValue(b.toString());
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Sets the value of this character literal node to the given character.
 * <p>
 * For example,
 * <pre>
 * CharacterLiteral s;
 * s.setCharValue('x');
 * assert s.charValue() == 'x';
 * assert s.getEscapedValue().equals("\'x\'");
 * </pre>
 * </p>
 *
 * @param value the character value
 */
public void setCharValue(char value) {
  StringBuffer b = new StringBuffer(3);
  b.append('\''); // opening delimiter
  Util.appendEscapedChar(b, value, false);
  b.append('\''); // closing delimiter
  setEscapedValue(b.toString());
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Sets the value of this character literal node to the given character.
 * <p>
 * For example,
 * <pre>
 * CharacterLiteral s;
 * s.setCharValue('x');
 * assert s.charValue() == 'x';
 * assert s.getEscapedValue().equals("\'x\'");
 * </pre>
 * </p>
 *
 * @param value the character value
 */
public void setCharValue(char value) {
  StringBuffer b = new StringBuffer(3);
  b.append('\''); // opening delimiter
  Util.appendEscapedChar(b, value, false);
  b.append('\''); // closing delimiter
  setEscapedValue(b.toString());
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

for (int i = 0; i < len; i++) {
  char c = value.charAt(i);
  Util.appendEscapedChar(b, c, true);

相关文章