org.jruby.RubyHash.visitLimited()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(67)

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

RubyHash.visitLimited介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

public <T> void visitAll(ThreadContext context, VisitorWithState visitor, T state) {
  // use -1 to disable concurrency checks
  visitLimited(context, visitor, -1, state);
}

代码示例来源:origin: org.jruby/jruby-core

public <T> void visitAll(ThreadContext context, VisitorWithState visitor, T state) {
  // use -1 to disable concurrency checks
  visitLimited(context, visitor, -1, state);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public void visitAll(Visitor visitor) {
  // use -1 to disable concurrency checks
  visitLimited(visitor, -1);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public void visitAll(Visitor visitor) {
  // use -1 to disable concurrency checks
  visitLimited(visitor, -1);
}

代码示例来源:origin: org.jruby/jruby-complete

@Deprecated
public final void visitAll(Visitor visitor) {
  // use -1 to disable concurrency checks
  visitLimited(getRuntime().getCurrentContext(), visitor, -1, null);
}

代码示例来源:origin: org.jruby/jruby-core

@Deprecated
public final void visitAll(Visitor visitor) {
  // use -1 to disable concurrency checks
  visitLimited(getRuntime().getCurrentContext(), visitor, -1, null);
}

代码示例来源:origin: org.jruby/jruby-core

public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException {
  output.registerLinkTarget(hash);
  int hashSize = hash.size;
  output.writeInt(hashSize);
  try {
    hash.visitLimited(hash.getRuntime().getCurrentContext(), MarshalDumpVisitor, hashSize, output);
  } catch (VisitorIOException e) {
    throw (IOException)e.getCause();
  }
  if (hash.ifNone != UNDEF) output.dumpObject(hash.ifNone);
}

代码示例来源:origin: org.jruby/jruby-complete

public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException {
  output.registerLinkTarget(hash);
  int hashSize = hash.size;
  output.writeInt(hashSize);
  try {
    hash.visitLimited(hash.getRuntime().getCurrentContext(), MarshalDumpVisitor, hashSize, output);
  } catch (VisitorIOException e) {
    throw (IOException)e.getCause();
  }
  if (hash.ifNone != UNDEF) output.dumpObject(hash.ifNone);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException {
  output.registerLinkTarget(hash);
  int hashSize = hash.size;
  output.writeInt(hashSize);
  try {
    hash.visitLimited(new Visitor() {
      public void visit(IRubyObject key, IRubyObject value) {
        try {
          output.dumpObject(key);
          output.dumpObject(value);
        } catch (IOException e) {
          throw new VisitorIOException(e);
        }
      }
    }, hashSize);
  } catch (VisitorIOException e) {
    throw (IOException)e.getCause();
  }
  if (!hash.ifNone.isNil()) output.dumpObject(hash.ifNone);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException {
  output.registerLinkTarget(hash);
  int hashSize = hash.size;
  output.writeInt(hashSize);
  try {
    hash.visitLimited(new Visitor() {
      public void visit(IRubyObject key, IRubyObject value) {
        try {
          output.dumpObject(key);
          output.dumpObject(value);
        } catch (IOException e) {
          throw new VisitorIOException(e);
        }
      }
    }, hashSize);
  } catch (VisitorIOException e) {
    throw (IOException)e.getCause();
  }
  if (!hash.ifNone.isNil()) output.dumpObject(hash.ifNone);
}

相关文章

微信公众号

最新文章

更多

RubyHash类方法