Refine search
public NativeCallbackFactory(Ruby runtime, CallbackInfo cbInfo) { this.runtime = runtime; this.closureInfo = newFunctionInfo(runtime, cbInfo); this.closurePool = com.kenai.jffi.ClosureManager.getInstance().getClosurePool(closureInfo.callContext); this.callbackInfo = cbInfo; this.callbackClass = runtime.getModule("FFI").getClass("Callback"); }
static ReaderImpl createReader(Ruby runtime, List<String> lines) { RubyArray rubyLines = runtime.newArray(lines.size()); for (String line : lines) { rubyLines.add(runtime.newString(line)); } RubyClass readerClass = runtime.getModule("Asciidoctor").getClass("Reader"); return new ReaderImpl(readerClass.callMethod("new", rubyLines)); }
@Override @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1) public final IRubyObject initialize(ThreadContext context, IRubyObject[] args) { IRubyObject type = args[2]; if (!(type instanceof CallbackInfo)) { throw context.runtime.newTypeError(type, context.runtime.getModule("FFI").getClass("Type").getClass("Function")); } init(args, FunctionFieldIO.INSTANCE); return this; } }
@Override @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1) public final IRubyObject initialize(ThreadContext context, IRubyObject[] args) { IRubyObject type = args[2]; if (!(type instanceof CallbackInfo)) { throw context.runtime.newTypeError(type, context.runtime.getModule("FFI").getClass("Type").getClass("Function")); } init(args, FunctionFieldIO.INSTANCE); return this; } }
@Override @JRubyMethod(name="initialize", visibility = PRIVATE, required = 3, optional = 1) public final IRubyObject initialize(ThreadContext context, IRubyObject[] args) { IRubyObject type = args[2]; if (!(type instanceof CallbackInfo)) { throw context.runtime.newTypeError(type, context.runtime.getModule("FFI").getClass("Type").getClass("Function")); } init(args, FunctionFieldIO.INSTANCE); return this; } }