本文整理了Java中org.jruby.anno.JRubyMethod.alias()
方法的一些代码示例,展示了JRubyMethod.alias()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JRubyMethod.alias()
方法的具体详情如下:
包路径:org.jruby.anno.JRubyMethod
类名称:JRubyMethod
方法名:alias
暂无
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public static void addMethodNamesToSet(Set<String> set, JRubyMethod jrubyMethod, String simpleName) {
if (jrubyMethod.name().length == 0) {
set.add(simpleName);
} else {
set.addAll(Arrays.asList(jrubyMethod.name()));
}
if (jrubyMethod.alias().length > 0) {
set.addAll(Arrays.asList(jrubyMethod.alias()));
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public static void addMethodNamesToSet(Set<String> set, JRubyMethod jrubyMethod, String simpleName) {
if (jrubyMethod.name().length == 0) {
set.add(simpleName);
} else {
set.addAll(Arrays.asList(jrubyMethod.name()));
}
if (jrubyMethod.alias().length > 0) {
set.addAll(Arrays.asList(jrubyMethod.alias()));
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void defineMethodOnClass(String methodVar, String classVar, JRubyMethod jrubyMethod, ExecutableElement md) {
CharSequence baseName;
if (jrubyMethod.name().length == 0) {
baseName = md.getSimpleName();
out.println(" " + classVar + ".addMethodAtBootTimeOnly(\"" + baseName + "\", " + methodVar + ");");
} else {
baseName = jrubyMethod.name()[0];
for (String name : jrubyMethod.name()) {
out.println(" " + classVar + ".addMethodAtBootTimeOnly(\"" + name + "\", " + methodVar + ");");
}
}
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
out.println(" " + classVar + ".defineAlias(\"" + alias + "\", \"" + baseName + "\");");
}
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void defineMethodOnClass(String methodVar, String classVar, JRubyMethod jrubyMethod, ExecutableElement md) {
CharSequence baseName;
if (jrubyMethod.name().length == 0) {
baseName = md.getSimpleName();
out.println(" " + classVar + ".addMethodAtBootTimeOnly(\"" + baseName + "\", " + methodVar + ");");
} else {
baseName = jrubyMethod.name()[0];
for (String name : jrubyMethod.name()) {
out.println(" " + classVar + ".addMethodAtBootTimeOnly(\"" + name + "\", " + methodVar + ");");
}
}
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
out.println(" " + classVar + ".defineAlias(\"" + alias + "\", \"" + baseName + "\");");
}
}
}
}
代码示例来源:origin: org.jruby/jruby-complete
public static void addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName) {
addMethodNamesToMap(map, jrubyMethod, simpleName, jrubyMethod.name(), jrubyMethod.alias());
}
代码示例来源:origin: org.jruby/jruby-core
public static void addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName) {
addMethodNamesToMap(map, jrubyMethod, simpleName, jrubyMethod.name(), jrubyMethod.alias());
}
代码示例来源:origin: org.jruby/jruby-complete
public void generateMethodAddCalls(ExecutableElement md, JRubyMethod anno) {
generateMethodAddCalls(md, anno.meta(), anno.module(), anno.name(), anno.alias());
}
代码示例来源:origin: org.jruby/jruby-core
public void generateMethodAddCalls(ExecutableElement md, JRubyMethod anno) {
generateMethodAddCalls(md, anno.meta(), anno.module(), anno.name(), anno.alias());
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
singletonClass.defineAlias(alias, baseName);
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
module.defineAlias(alias, baseName);
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
singletonClass.defineAlias(alias, baseName);
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
singletonClass.defineAlias(alias, baseName);
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
module.defineAlias(alias, baseName);
if (jrubyMethod.alias().length > 0) {
for (String alias : jrubyMethod.alias()) {
singletonClass.defineAlias(alias, baseName);
代码示例来源:origin: org.jruby/jruby-complete
public void generateMethodAddCalls(ExecutableElement md, JRubyMethod jrubyMethod) {
final String[] names = jrubyMethod.name();
final String[] aliases = jrubyMethod.alias();
if (jrubyMethod.meta()) {
defineMethodOnClass(BASEMETHOD, SINGLETONCLASS, names, aliases, md);
} else {
defineMethodOnClass(BASEMETHOD, CLASS, names, aliases, md);
if (jrubyMethod.module()) {
mv.aload(CLASS);
mv.aload(BASEMETHOD);
mv.invokestatic("org/jruby/anno/TypePopulator", "populateModuleMethod", "(Lorg/jruby/RubyModule;Lorg/jruby/internal/runtime/methods/DynamicMethod;)Lorg/jruby/internal/runtime/methods/DynamicMethod;");
mv.astore(MODULEMETHOD);
defineMethodOnClass(MODULEMETHOD, SINGLETONCLASS, names, aliases, md);
}
}
}
代码示例来源:origin: org.jruby/jruby-core
public void generateMethodAddCalls(ExecutableElement md, JRubyMethod jrubyMethod) {
final String[] names = jrubyMethod.name();
final String[] aliases = jrubyMethod.alias();
if (jrubyMethod.meta()) {
defineMethodOnClass(BASEMETHOD, SINGLETONCLASS, names, aliases, md);
} else {
defineMethodOnClass(BASEMETHOD, CLASS, names, aliases, md);
if (jrubyMethod.module()) {
mv.aload(CLASS);
mv.aload(BASEMETHOD);
mv.invokestatic("org/jruby/anno/TypePopulator", "populateModuleMethod", "(Lorg/jruby/RubyModule;Lorg/jruby/internal/runtime/methods/DynamicMethod;)Lorg/jruby/internal/runtime/methods/DynamicMethod;");
mv.astore(MODULEMETHOD);
defineMethodOnClass(MODULEMETHOD, SINGLETONCLASS, names, aliases, md);
}
}
}
代码示例来源:origin: org.jruby/jruby-complete
private static void define(RubyModule module, JavaMethodDescriptor desc, final String simpleName, DynamicMethod dynamicMethod) {
JRubyMethod jrubyMethod = desc.anno;
final String[] names = jrubyMethod.name();
final String[] aliases = jrubyMethod.alias();
代码示例来源:origin: org.jruby/jruby-core
private static void define(RubyModule module, JavaMethodDescriptor desc, final String simpleName, DynamicMethod dynamicMethod) {
JRubyMethod jrubyMethod = desc.anno;
final String[] names = jrubyMethod.name();
final String[] aliases = jrubyMethod.alias();
内容来源于网络,如有侵权,请联系作者删除!