org.jruby.RubyModule.getSingletonClass()方法的使用及代码示例

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

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

RubyModule.getSingletonClass介绍

暂无

代码示例

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.digest.RubyDigest$INVOKER$s$1$0$s_hexencode(singletonClass, Visibility.PUBLIC);
  populateMethod(javaMethod, 1, "s_hexencode", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.digest.RubyDigest.class, "s_hexencode", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  singletonClass.addMethodAtBootTimeOnly("hexencode", javaMethod);
  runtime.addBoundMethod("org.jruby.ext.digest.RubyDigest","s_hexencode","hexencode");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.jffi.JFFIInvoker$INVOKER$s$1$0$newInstance(singletonClass, Visibility.PUBLIC, "new");
  populateMethod(javaMethod, 1, "newInstance", true, false, org.jruby.ext.ffi.jffi.JFFIInvoker.class, "newInstance", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);
  aliasedMethod = singletonClass.putMethod(runtime, "new", javaMethod);
  runtime.addBoundMethods("org.jruby.ext.ffi.jffi.JFFIInvoker", "newInstance", "new");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.digest.RubyDigest$INVOKER$s$1$0$s_hexencode(singletonClass, Visibility.PUBLIC);
  populateMethod(javaMethod, 1, "s_hexencode", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.digest.RubyDigest.class, "s_hexencode", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  singletonClass.addMethodAtBootTimeOnly("hexencode", javaMethod);
  runtime.addBoundMethod("org.jruby.ext.digest.RubyDigest","s_hexencode","hexencode");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.rbconfig.RbConfigLibrary$INVOKER$s$0$0$ruby(singletonClass, Visibility.PUBLIC, "ruby");
  populateMethod(javaMethod, 0, "ruby", true, false, org.jruby.ext.rbconfig.RbConfigLibrary.class, "ruby", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
  aliasedMethod = singletonClass.putMethod(runtime, "ruby", javaMethod);
  runtime.addBoundMethods("org.jruby.ext.rbconfig.RbConfigLibrary", "ruby", "ruby");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.jffi.JFFIInvoker$INVOKER$s$1$0$newInstance(singletonClass, Visibility.PUBLIC);
  populateMethod(javaMethod, 1, "newInstance", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.ffi.jffi.JFFIInvoker.class, "newInstance", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.ThreadContext.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject[].class});
  singletonClass.addMethodAtBootTimeOnly("new", javaMethod);
  runtime.addBoundMethod("org.jruby.ext.ffi.jffi.JFFIInvoker","newInstance","new");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.jffi.JFFIInvoker$INVOKER$s$1$0$newInstance(singletonClass, Visibility.PUBLIC, "new");
  populateMethod(javaMethod, 1, "newInstance", true, false, org.jruby.ext.ffi.jffi.JFFIInvoker.class, "newInstance", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);
  aliasedMethod = singletonClass.putMethod(runtime, "new", javaMethod);
  runtime.addBoundMethods("org.jruby.ext.ffi.jffi.JFFIInvoker", "newInstance", "new");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.jffi.JFFIInvoker$INVOKER$s$1$0$newInstance(singletonClass, Visibility.PUBLIC);
  populateMethod(javaMethod, 1, "newInstance", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.ffi.jffi.JFFIInvoker.class, "newInstance", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.ThreadContext.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject[].class});
  singletonClass.addMethodAtBootTimeOnly("new", javaMethod);
  runtime.addBoundMethod("org.jruby.ext.ffi.jffi.JFFIInvoker","newInstance","new");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.rbconfig.RbConfigLibrary$INVOKER$s$0$0$ruby(singletonClass, Visibility.PUBLIC, "ruby");
  populateMethod(javaMethod, 0, "ruby", true, false, org.jruby.ext.rbconfig.RbConfigLibrary.class, "ruby", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
  aliasedMethod = singletonClass.putMethod(runtime, "ruby", javaMethod);
  runtime.addBoundMethods("org.jruby.ext.rbconfig.RbConfigLibrary", "ruby", "ruby");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.jruby.JRubyTypeLibrary$INVOKER$s$3$0$coerce_to(cls, Visibility.PUBLIC);
  populateMethod(javaMethod, 3, "coerce_to", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.jruby.JRubyTypeLibrary.class, "coerce_to", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.ThreadContext.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  cls.addMethodAtBootTimeOnly("coerce_to", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("coerce_to", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.jruby.JRubyTypeLibrary","coerce_to","coerce_to");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.pathname.RubyPathname$PathnameKernelMethods$INVOKER$s$1$0$newPathname(cls, Visibility.PRIVATE, "Pathname");
  populateMethod(javaMethod, 1, "newPathname", true, false, org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods.class, "newPathname", org.jruby.runtime.builtin.IRubyObject.class, ARG2);
  aliasedMethod = cls.putMethod(runtime, "Pathname", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "Pathname", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods", "newPathname", "Pathname");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.jruby.JRubyTypeLibrary$INVOKER$s$3$0$coerce_to(cls, Visibility.PUBLIC);
  populateMethod(javaMethod, 3, "coerce_to", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.jruby.JRubyTypeLibrary.class, "coerce_to", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.ThreadContext.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  cls.addMethodAtBootTimeOnly("coerce_to", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("coerce_to", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.jruby.JRubyTypeLibrary","coerce_to","coerce_to");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.bigdecimal.RubyBigDecimal$BigDecimalKernelMethods$INVOKER$s$newBigDecimal(cls, Visibility.PRIVATE, "BigDecimal");
  populateMethod(javaMethod, -1, "newBigDecimal", true, false, org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods.class, "newBigDecimal", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
  aliasedMethod = cls.putMethod(runtime, "BigDecimal", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "BigDecimal", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods", "newBigDecimal", "BigDecimal");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.bigdecimal.RubyBigDecimal$BigDecimalKernelMethods$INVOKER$s$0$0$newBigDecimal(cls, Visibility.PRIVATE);
  populateMethod(javaMethod, -1, "newBigDecimal", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods.class, "newBigDecimal", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject[].class});
  cls.addMethodAtBootTimeOnly("BigDecimal", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("BigDecimal", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods","newBigDecimal","BigDecimal");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.timeout.Timeout$INVOKER$s$timeout(cls, Visibility.PUBLIC, "timeout");
  populateMethod(javaMethod, -1, "timeout", true, false, org.jruby.ext.timeout.Timeout.class, "timeout", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2_BLOCK);
  aliasedMethod = cls.putMethod(runtime, "timeout", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "timeout", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.timeout.Timeout", "timeout", "timeout");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.pathname.RubyPathname$PathnameKernelMethods$INVOKER$s$1$0$newPathname(cls, Visibility.PRIVATE);
  populateMethod(javaMethod, 1, "newPathname", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods.class, "newPathname", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  cls.addMethodAtBootTimeOnly("Pathname", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("Pathname", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods","newPathname","Pathname");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.IOModule$INVOKER$s$3$0$native_read(cls, Visibility.PUBLIC, "native_read");
  populateMethod(javaMethod, 3, "native_read", true, false, org.jruby.ext.ffi.IOModule.class, "native_read", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG4);
  aliasedMethod = cls.putMethod(runtime, "native_read", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "native_read", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.ffi.IOModule", "native_read", "native_read");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.bigdecimal.RubyBigDecimal$BigDecimalKernelMethods$INVOKER$s$0$0$newBigDecimal(cls, Visibility.PRIVATE);
  populateMethod(javaMethod, -1, "newBigDecimal", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods.class, "newBigDecimal", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject[].class});
  cls.addMethodAtBootTimeOnly("BigDecimal", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("BigDecimal", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods","newBigDecimal","BigDecimal");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.ffi.IOModule$INVOKER$s$3$0$native_read(cls, Visibility.PUBLIC, "native_read");
  populateMethod(javaMethod, 3, "native_read", true, false, org.jruby.ext.ffi.IOModule.class, "native_read", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG4);
  aliasedMethod = cls.putMethod(runtime, "native_read", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "native_read", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.ffi.IOModule", "native_read", "native_read");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.pathname.RubyPathname$PathnameKernelMethods$INVOKER$s$1$0$newPathname(cls, Visibility.PRIVATE);
  populateMethod(javaMethod, 1, "newPathname", true, CallConfiguration.FrameNoneScopeNone, false, org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods.class, "newPathname", org.jruby.runtime.builtin.IRubyObject.class, new Class[] {org.jruby.runtime.builtin.IRubyObject.class, org.jruby.runtime.builtin.IRubyObject.class});
  cls.addMethodAtBootTimeOnly("Pathname", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  singletonClass.addMethodAtBootTimeOnly("Pathname", moduleMethod);
  runtime.addBoundMethod("org.jruby.ext.pathname.RubyPathname.PathnameKernelMethods","newPathname","Pathname");
}
static {

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

public void populate(RubyModule cls, Class clazz) {
  JavaMethod javaMethod;
  DynamicMethod moduleMethod, aliasedMethod;
  RubyClass singletonClass = cls.getSingletonClass();
  Ruby runtime = cls.getRuntime();
  javaMethod = new org.jruby.ext.bigdecimal.RubyBigDecimal$BigDecimalKernelMethods$INVOKER$s$newBigDecimal(cls, Visibility.PRIVATE, "BigDecimal");
  populateMethod(javaMethod, -1, "newBigDecimal", true, false, org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods.class, "newBigDecimal", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
  aliasedMethod = cls.putMethod(runtime, "BigDecimal", javaMethod);
  moduleMethod = populateModuleMethod(cls, javaMethod);
  aliasedMethod = singletonClass.putMethod(runtime, "BigDecimal", moduleMethod);
  runtime.addBoundMethods("org.jruby.ext.bigdecimal.RubyBigDecimal.BigDecimalKernelMethods", "newBigDecimal", "BigDecimal");
}
static {

相关文章

微信公众号

最新文章

更多

RubyModule类方法