org.apache.dubbo.common.json.Yylex.yyreset()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(117)

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

Yylex.yyreset介绍

[英]Resets the scanner to read from a new input stream. Does not close the old reader.

All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.
[中]将扫描仪重置为从新的输入流中读取。不会关闭旧的阅读器。
所有内部变量都被重置,旧的输入流无法重用(内部缓冲区被丢弃并丢失)。词法状态设置为ZZ_首字母。

代码示例

代码示例来源:origin: apache/incubator-dubbo

private static Yylex getLexer(Reader reader) {
  Yylex ret = LOCAL_LEXER.get();
  if (ret == null) {
    ret = new Yylex(reader);
    LOCAL_LEXER.set(ret);
  } else {
    ret.yyreset(reader);
  }
  return ret;
}

代码示例来源:origin: apache/incubator-dubbo

private static Yylex getLexer(Reader reader) {
  Yylex ret = LOCAL_LEXER.get();
  if (ret == null) {
    ret = new Yylex(reader);
    LOCAL_LEXER.set(ret);
  } else {
    ret.yyreset(reader);
  }
  return ret;
}

代码示例来源:origin: org.apache.dubbo/dubbo-common

private static Yylex getLexer(Reader reader) {
  Yylex ret = LOCAL_LEXER.get();
  if (ret == null) {
    ret = new Yylex(reader);
    LOCAL_LEXER.set(ret);
  } else {
    ret.yyreset(reader);
  }
  return ret;
}

代码示例来源:origin: org.apache.dubbo/dubbo

private static Yylex getLexer(Reader reader) {
  Yylex ret = LOCAL_LEXER.get();
  if (ret == null) {
    ret = new Yylex(reader);
    LOCAL_LEXER.set(ret);
  } else {
    ret.yyreset(reader);
  }
  return ret;
}

相关文章