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; }
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 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()); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
/** * Return a binding representing the current call's state but with the * specified scope and self. * @param self the self object to use * @param scope the scope to use * @return the current binding using the specified self and scope */ public Binding currentBinding(IRubyObject self, DynamicScope scope) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, frame.getVisibility(), scope, elt.getMethod(), elt.getFilename(), elt.getLine()); }
/** * 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()); }
/** * 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()); }
/** * Return a binding representing the current call's state but with the * specified scope and self. * @param self the self object to use * @param scope the scope to use * @return the current binding using the specified self and scope */ public Binding currentBinding(IRubyObject self, DynamicScope scope) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, frame.getVisibility(), scope, elt.getMethod(), elt.getFilename(), elt.getLine()); }
/** * Return a binding representing the current call's state but with a specified self * @param self the self object to use * @return the current binding, using the specified self */ public Binding currentBinding(IRubyObject self) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, frame.getVisibility(), getCurrentScope(), elt.getMethod(), elt.getFilename(), elt.getLine()); }
/** * Return a binding representing the current call's state but with a specified self * @param self the self object to use * @return the current binding, using the specified self */ public Binding currentBinding(IRubyObject self) { Frame frame = getCurrentFrame().capture(); BacktraceElement elt = backtrace[backtraceIndex]; return new Binding(self, frame, frame.getVisibility(), getCurrentScope(), elt.getMethod(), elt.getFilename(), elt.getLine()); }