org.jruby.RubyClass.putAlias()方法的使用及代码示例

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

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

RubyClass.putAlias介绍

暂无

代码示例

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

populateMethod(javaMethod, -1, "civil", true, false, org.jruby.ext.date.RubyDateTime.class, "civil", org.jruby.ext.date.RubyDateTime.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "civil", javaMethod);
singletonClass.putAlias("new", aliasedMethod, "civil");
javaMethod = new org.jruby.ext.date.RubyDateTime$INVOKER$s$_strptime(singletonClass, Visibility.PUBLIC, "_strptime");
populateMethod(javaMethod, -1, "_strptime", true, false, org.jruby.ext.date.RubyDateTime.class, "_strptime", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);

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

populateMethod(javaMethod, -1, "civil", true, false, org.jruby.ext.date.RubyDateTime.class, "civil", org.jruby.ext.date.RubyDateTime.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "civil", javaMethod);
singletonClass.putAlias("new", aliasedMethod, "civil");
javaMethod = new org.jruby.ext.date.RubyDateTime$INVOKER$s$_strptime(singletonClass, Visibility.PUBLIC, "_strptime");
populateMethod(javaMethod, -1, "_strptime", true, false, org.jruby.ext.date.RubyDateTime.class, "_strptime", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);

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

aliasedMethod = singletonClass.putMethod(runtime, "objectspace", moduleMethod);
singletonClass.putMethod(runtime, "object_space?", moduleMethod);
singletonClass.putAlias("objectspace?", aliasedMethod, "objectspace");
javaMethod = new org.jruby.ext.jruby.JRubyUtilLibrary$INVOKER$s$0$0$cache_stats(cls, Visibility.PUBLIC, "cache_stats");
populateMethod(javaMethod, 0, "cache_stats", true, false, org.jruby.ext.jruby.JRubyUtilLibrary.class, "cache_stats", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
moduleMethod = populateModuleMethod(cls, javaMethod);
aliasedMethod = singletonClass.putMethod(runtime, "class_loader_resources", moduleMethod);
singletonClass.putAlias("classloader_resources", aliasedMethod, "class_loader_resources");
javaMethod = new org.jruby.ext.jruby.JRubyUtilLibrary$INVOKER$s$1$0$setObjectSpaceEnabled(cls, Visibility.PUBLIC, "objectspace=");
populateMethod(javaMethod, 1, "setObjectSpaceEnabled", true, false, org.jruby.ext.jruby.JRubyUtilLibrary.class, "setObjectSpaceEnabled", org.jruby.runtime.builtin.IRubyObject.class, ARG2);

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

aliasedMethod = singletonClass.putMethod(runtime, "objectspace", moduleMethod);
singletonClass.putMethod(runtime, "object_space?", moduleMethod);
singletonClass.putAlias("objectspace?", aliasedMethod, "objectspace");
javaMethod = new org.jruby.ext.jruby.JRubyUtilLibrary$INVOKER$s$0$0$cache_stats(cls, Visibility.PUBLIC, "cache_stats");
populateMethod(javaMethod, 0, "cache_stats", true, false, org.jruby.ext.jruby.JRubyUtilLibrary.class, "cache_stats", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
moduleMethod = populateModuleMethod(cls, javaMethod);
aliasedMethod = singletonClass.putMethod(runtime, "class_loader_resources", moduleMethod);
singletonClass.putAlias("classloader_resources", aliasedMethod, "class_loader_resources");
javaMethod = new org.jruby.ext.jruby.JRubyUtilLibrary$INVOKER$s$1$0$setObjectSpaceEnabled(cls, Visibility.PUBLIC, "objectspace=");
populateMethod(javaMethod, 1, "setObjectSpaceEnabled", true, false, org.jruby.ext.jruby.JRubyUtilLibrary.class, "setObjectSpaceEnabled", org.jruby.runtime.builtin.IRubyObject.class, ARG2);

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

populateMethod(javaMethod, 0, "getwd", true, false, org.jruby.ext.pathname.RubyPathname.class, "getwd", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "getwd", javaMethod);
singletonClass.putAlias("pwd", aliasedMethod, "getwd");
javaMethod = new org.jruby.ext.pathname.RubyPathname$INVOKER$s$0$1$glob(singletonClass, Visibility.PUBLIC, "glob");
populateMethod(javaMethod, -1, "glob", true, false, org.jruby.ext.pathname.RubyPathname.class, "glob", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY_BLOCK);

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

populateMethod(javaMethod, 0, "getwd", true, false, org.jruby.ext.pathname.RubyPathname.class, "getwd", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "getwd", javaMethod);
singletonClass.putAlias("pwd", aliasedMethod, "getwd");
javaMethod = new org.jruby.ext.pathname.RubyPathname$INVOKER$s$0$1$glob(singletonClass, Visibility.PUBLIC, "glob");
populateMethod(javaMethod, -1, "glob", true, false, org.jruby.ext.pathname.RubyPathname.class, "glob", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY_BLOCK);

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

moduleMethod = populateModuleMethod(cls, javaMethod);
aliasedMethod = singletonClass.putMethod(runtime, "parse", moduleMethod);
singletonClass.putAlias("ast_for", aliasedMethod, "parse");
javaMethod = new org.jruby.ext.jruby.JRubyLibrary$INVOKER$s$0$1$set_context_class_loader(cls, Visibility.PUBLIC, "set_context_class_loader");
populateMethod(javaMethod, -1, "set_context_class_loader", true, false, org.jruby.ext.jruby.JRubyLibrary.class, "set_context_class_loader", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);

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

moduleMethod = populateModuleMethod(cls, javaMethod);
aliasedMethod = singletonClass.putMethod(runtime, "parse", moduleMethod);
singletonClass.putAlias("ast_for", aliasedMethod, "parse");
javaMethod = new org.jruby.ext.jruby.JRubyLibrary$INVOKER$s$0$1$set_context_class_loader(cls, Visibility.PUBLIC, "set_context_class_loader");
populateMethod(javaMethod, -1, "set_context_class_loader", true, false, org.jruby.ext.jruby.JRubyLibrary.class, "set_context_class_loader", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);

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

populateMethod(javaMethod, -1, "civil", true, false, org.jruby.ext.date.RubyDate.class, "civil", org.jruby.ext.date.RubyDate.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "civil", javaMethod);
singletonClass.putAlias("new", aliasedMethod, "civil");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$1$0$_load(singletonClass, Visibility.PUBLIC, "_load");
populateMethod(javaMethod, 1, "_load", true, false, org.jruby.ext.date.RubyDate.class, "_load", org.jruby.ext.date.RubyDate.class, CONTEXT_ARG2);
populateMethod(javaMethod, 1, "gregorian_leap_p", true, false, org.jruby.ext.date.RubyDate.class, "gregorian_leap_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
aliasedMethod = singletonClass.putMethod(runtime, "gregorian_leap?", javaMethod);
singletonClass.putAlias("leap?", aliasedMethod, "gregorian_leap?");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$1$0$zone_to_diff(singletonClass, Visibility.PRIVATE, "zone_to_diff");
populateMethod(javaMethod, 1, "zone_to_diff", true, false, org.jruby.ext.date.RubyDate.class, "zone_to_diff", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
populateMethod(javaMethod, -1, "valid_civil_p", true, false, org.jruby.ext.date.RubyDate.class, "valid_civil_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);
aliasedMethod = singletonClass.putMethod(runtime, "valid_civil?", javaMethod);
singletonClass.putAlias("valid_date?", aliasedMethod, "valid_civil?");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$0$1$_valid_civil_p(singletonClass, Visibility.PUBLIC, "_valid_civil?");
populateMethod(javaMethod, -1, "_valid_civil_p", true, false, org.jruby.ext.date.RubyDate.class, "_valid_civil_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);

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

populateMethod(javaMethod, -1, "civil", true, false, org.jruby.ext.date.RubyDate.class, "civil", org.jruby.ext.date.RubyDate.class, CONTEXT_ARG1);
aliasedMethod = singletonClass.putMethod(runtime, "civil", javaMethod);
singletonClass.putAlias("new", aliasedMethod, "civil");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$1$0$_load(singletonClass, Visibility.PUBLIC, "_load");
populateMethod(javaMethod, 1, "_load", true, false, org.jruby.ext.date.RubyDate.class, "_load", org.jruby.ext.date.RubyDate.class, CONTEXT_ARG2);
populateMethod(javaMethod, 1, "gregorian_leap_p", true, false, org.jruby.ext.date.RubyDate.class, "gregorian_leap_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
aliasedMethod = singletonClass.putMethod(runtime, "gregorian_leap?", javaMethod);
singletonClass.putAlias("leap?", aliasedMethod, "gregorian_leap?");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$1$0$zone_to_diff(singletonClass, Visibility.PRIVATE, "zone_to_diff");
populateMethod(javaMethod, 1, "zone_to_diff", true, false, org.jruby.ext.date.RubyDate.class, "zone_to_diff", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG2);
populateMethod(javaMethod, -1, "valid_civil_p", true, false, org.jruby.ext.date.RubyDate.class, "valid_civil_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);
aliasedMethod = singletonClass.putMethod(runtime, "valid_civil?", javaMethod);
singletonClass.putAlias("valid_date?", aliasedMethod, "valid_civil?");
javaMethod = new org.jruby.ext.date.RubyDate$INVOKER$s$0$1$_valid_civil_p(singletonClass, Visibility.PUBLIC, "_valid_civil?");
populateMethod(javaMethod, -1, "_valid_civil_p", true, false, org.jruby.ext.date.RubyDate.class, "_valid_civil_p", org.jruby.runtime.builtin.IRubyObject.class, CONTEXT_ARG1_ARY);

相关文章

微信公众号

最新文章

更多

RubyClass类方法