本文整理了Java中org.jruby.Ruby.getDefinedMessage
方法的一些代码示例,展示了Ruby.getDefinedMessage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getDefinedMessage
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getDefinedMessage
暂无
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return runtime.getDefinedMessage(DefinedMessage.METHOD);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return runtime.getDefinedMessage(DefinedMessage.SELF);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
try {
interpret(runtime, context, self, aBlock);
return runtime.getDefinedMessage(DefinedMessage.ASSIGNMENT);
} catch (JumpException jumpExcptn) {
}
return null;
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
try {
interpret(runtime, context, self, aBlock);
return runtime.getDefinedMessage(DefinedMessage.ASSIGNMENT);
} catch (JumpException jumpExcptn) {
}
return null;
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
try {
interpret(runtime, context, self, aBlock);
return runtime.getDefinedMessage(DefinedMessage.EXPRESSION);
} catch (JumpException jumpExcptn) {
}
return null;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return aBlock.isGiven() ? runtime.getDefinedMessage(DefinedMessage.YIELD) : null;
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return getValue(runtime, self) == null ? null : runtime.getDefinedMessage(DefinedMessage.INSTANCE_VARIABLE);
}
}
代码示例来源:origin: org.jruby/jruby-complete
public final IRubyObject getConstantDefined(ThreadContext context, StaticScope scope, String name, int index) {
IRubyObject value = getValue(context, scope, name, index);
return value == null ? null : context.runtime.getDefinedMessage(DefinedMessage.CONSTANT);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return aBlock.isGiven() ? runtime.getDefinedMessage(DefinedMessage.YIELD) : null;
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public static RubyString getDefinedNot(Ruby runtime, RubyString definition) {
if (definition != null && runtime.is1_9()) {
definition = runtime.getDefinedMessage(DefinedMessage.METHOD);
}
return definition;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
try {
interpret(runtime, context, self, aBlock);
return runtime.getDefinedMessage(DefinedMessage.ASSIGNMENT);
} catch (JumpException jumpExcptn) {
}
return null;
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
if (!context.runtime.is1_9()) {
return super.definition(runtime, context, self, aBlock);
} else {
return runtime.getDefinedMessage(DefinedMessage.EXPRESSION);
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
if (!context.runtime.is1_9()) {
return super.definition(runtime, context, self, aBlock);
} else {
return runtime.getDefinedMessage(DefinedMessage.EXPRESSION);
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
try {
if (hasMethod(leftNode.interpret(runtime, context, self, aBlock))) {
return runtime.getDefinedMessage(DefinedMessage.METHOD);
}
} catch (JumpException e) {
}
return null;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
return runtime.getGlobalVariables().isDefined(name) ? runtime.getDefinedMessage(DefinedMessage.GLOBAL_VARIABLE) : null;
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public static RubyString getDefinedConstantOrBoundMethod(IRubyObject left, String name) {
if (isModuleAndHasConstant(left, name)) return left.getRuntime().getDefinedMessage(DefinedMessage.CONSTANT);
if (left.getMetaClass().isMethodBound(name, true)) left.getRuntime().getDefinedMessage(DefinedMessage.METHOD);
return null;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public static RubyString getDefinedConstantOrBoundMethod(IRubyObject left, String name) {
if (isModuleAndHasConstant(left, name)) return left.getRuntime().getDefinedMessage(DefinedMessage.CONSTANT);
if (left.getMetaClass().isMethodBound(name, true)) left.getRuntime().getDefinedMessage(DefinedMessage.METHOD);
return null;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
String name = context.getFrameName();
RubyModule klazz = context.getFrameKlazz();
if (name != null &&
klazz != null &&
Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass().isMethodBound(name, false)) {
return runtime.getDefinedMessage(DefinedMessage.SUPER);
}
return null;
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
String name = context.getFrameName();
RubyModule klazz = context.getFrameKlazz();
if (name != null &&
klazz != null &&
Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass().isMethodBound(name, false)) {
return runtime.getDefinedMessage(DefinedMessage.SUPER);
}
return null;
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public RubyString definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) {
String name = context.getFrameName();
RubyModule klazz = context.getFrameKlazz();
if (name != null &&
klazz != null &&
Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass().isMethodBound(name, false)) {
return ASTInterpreter.getArgumentDefinition(runtime, context, argsNode, runtime.getDefinedMessage(DefinedMessage.SUPER), self, aBlock);
}
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!