@Override public BacktraceElement clone() { return new BacktraceElement(method, filename, line); }
/** * Return a binding representing the current call's state but with the * specified visibility, scope, and self. For shared-scope binding * consumers like for loops. * * @param self the self object to use * @param visibility the visibility to use * @param scope the scope to use * @return the current binding using the specified self, scope, and visibility */ public Binding currentBinding(IRubyObject self, Visibility visibility, DynamicScope scope) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, visibility, scope, elt.getMethod(), elt.getFilename(), elt.getLine()); }
public static void pushBacktrace(ThreadContext context, String method, String file, int line) { int index = ++context.backtraceIndex; BacktraceElement[] stack = context.backtrace; BacktraceElement.update(stack[index], method, file, line); if (index + 1 == stack.length) { ThreadContext.expandBacktraceIfNecessary(context); } }
private LogRecord createLogRecord(final ThreadContext threadContext, final Severity severity, final Cursor cursor, final String message) { BacktraceElement[] backtrace = threadContext.getBacktrace(); final String sourceFileName = backtrace[2].getFilename(); final String sourceMethodName = backtrace[2].getMethod(); final LogRecord record = new LogRecord(severity, cursor, message, sourceFileName, sourceMethodName); return record; }
/** * Return a binding representing the previous call's state * @return the current binding */ @Deprecated public Binding previousBinding() { Frame frame = getPreviousFrame(); return new Binding(frame, getPreviousRubyClass(), getCurrentScope(), backtrace[backtraceIndex].clone()); }
private LogRecord createLogRecord(final ThreadContext threadContext, final Severity severity, final Cursor cursor, final String message) { BacktraceElement[] backtrace = threadContext.getBacktrace(); final String sourceFileName = backtrace[2].getFilename(); final String sourceMethodName = backtrace[2].getMethod(); final LogRecord record = new LogRecord(severity, cursor, message, sourceFileName, sourceMethodName); return record; }
/** * Return a binding representing the previous call's state * @return the current binding */ @Deprecated public Binding previousBinding() { Frame frame = getPreviousFrame(); return new Binding(frame, getPreviousRubyClass(), getCurrentScope(), backtrace[backtraceIndex].clone()); }
/** * Return a binding representing the current call's state but with the * specified visibility, scope, and self. For shared-scope binding * consumers like for loops. * * @param self the self object to use * @param visibility the visibility to use * @param scope the scope to use * @return the current binding using the specified self, scope, and visibility */ public Binding currentBinding(IRubyObject self, Visibility visibility, DynamicScope scope) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, visibility, scope, elt.getMethod(), elt.getFilename(), elt.getLine()); }
@Override public BacktraceElement clone() { return new BacktraceElement(method, filename, line); }
public static void pushBacktrace(ThreadContext context, String method, ISourcePosition position) { int index = ++context.backtraceIndex; BacktraceElement[] stack = context.backtrace; BacktraceElement.update(stack[index], method, position); if (index + 1 == stack.length) { ThreadContext.expandBacktraceIfNecessary(context); } }
/** * Return a binding representing the previous call's state but with a specified self * @param self the self object to use * @return the current binding, using the specified self */ @Deprecated public Binding previousBinding(IRubyObject self) { Frame frame = getPreviousFrame(); return new Binding(self, frame, frame.getVisibility(), getPreviousRubyClass(), getCurrentScope(), backtrace[backtraceIndex].clone()); }
/** * Return a binding representing the current call's state but with the * specified visibility and self. * @param self the self object to use * @param visibility the visibility to use * @return the current binding using the specified self and visibility */ public Binding currentBinding(IRubyObject self, Visibility visibility) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, visibility, getCurrentScope(), elt.getMethod(), elt.getFilename(), elt.getLine()); }
@Override public BacktraceElement clone() { return new BacktraceElement(method, filename, line); }
public static void pushBacktrace(ThreadContext context, String method, String file, int line) { int index = ++context.backtraceIndex; BacktraceElement[] stack = context.backtrace; BacktraceElement.update(stack[index], method, file, line); if (index + 1 == stack.length) { ThreadContext.expandBacktraceStack(context); } }
/** * Return a binding representing the previous call's state but with a specified self * @param self the self object to use * @return the current binding, using the specified self */ @Deprecated public Binding previousBinding(IRubyObject self) { Frame frame = getPreviousFrame(); return new Binding(self, frame, frame.getVisibility(), getPreviousRubyClass(), getCurrentScope(), backtrace[backtraceIndex].clone()); }
/** * Return a binding representing the current call's state * @return the current binding */ public Binding currentBinding() { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(frame, getCurrentScope(), elt.getMethod(), elt.getFilename(), elt.getLine()); }
@Override public BacktraceElement clone() { return new BacktraceElement(method, filename, line); }
public static void pushBacktrace(ThreadContext context, String method, String file, int line) { int index = ++context.backtraceIndex; BacktraceElement[] stack = context.backtrace; BacktraceElement.update(stack[index], method, file, line); if (index + 1 == stack.length) { ThreadContext.expandBacktraceStack(context); } }
/** * Return a binding representing the current call's state but with the * specified visibility, scope, and self. For shared-scope binding * consumers like for loops. * * @param self the self object to use * @param visibility the visibility to use * @param scope the scope to use * @return the current binding using the specified self, scope, and visibility */ public Binding currentBinding(IRubyObject self, Visibility visibility, DynamicScope scope) { Frame frame = getCurrentFrame().capture(); return new Binding(self, frame, visibility, getRubyClass(), scope, backtrace[backtraceIndex].clone()); }
/** * Return a binding representing the current call's state * @return the current binding */ public Binding currentBinding() { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(frame, getCurrentScope(), elt.getMethod(), elt.getFilename(), elt.getLine()); }