gpt4 book ai didi

org.jruby.ir.targets.ZSuperInvokeSite类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 09:33:09 27 4
gpt4 key购买 nike

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

ZSuperInvokeSite介绍

[英]Created by headius on 10/23/14.
[中]海德乌斯于2014年10月23日创作。

代码示例

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

public IRubyObject fail(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable {
    return invoke(context, caller, self, definingModule, args, block);
  }
}

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

public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType type, String splatmapString, String file, int line) {
  List<String> targetAndMethod = StringSupport.split(name, ':');
  String superName = JavaNameMangler.demangleMethodName(targetAndMethod.get(1));
  InvokeSite site;
  switch (targetAndMethod.get(0)) {
    case "invokeInstanceSuper":
      site = new InstanceSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeClassSuper":
      site = new ClassSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeUnresolvedSuper":
      site = new UnresolvedSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeZSuper":
      site = new ZSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    default:
      throw new RuntimeException("invalid super call: " + name);
  }
  return InvokeSite.bootstrap(site, lookup);
}

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

public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType type, String splatmapString, String file, int line) {
  List<String> targetAndMethod = StringSupport.split(name, ':');
  String superName = JavaNameMangler.demangleMethodName(targetAndMethod.get(1));
  InvokeSite site;
  switch (targetAndMethod.get(0)) {
    case "invokeInstanceSuper":
      site = new InstanceSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeClassSuper":
      site = new ClassSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeUnresolvedSuper":
      site = new UnresolvedSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    case "invokeZSuper":
      site = new ZSuperInvokeSite(type, superName, splatmapString, file, line);
      break;
    default:
      throw new RuntimeException("invalid super call: " + name);
  }
  return InvokeSite.bootstrap(site, lookup);
}

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

public IRubyObject fail(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable {
    return invoke(context, caller, self, definingModule, args, block);
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com