@Override public String debug() { final DebugString debug = new DebugString(); memento.debug(debug); return debug.toString(); }
@Override public String debugData() { final DebugString debugString = new DebugString(); debugString.indent(); debugString.indent(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
public MonitorEvent(final String category, final String message, final DebuggableWithTitle[] debugDetails) { this.message = message; this.category = category; debug = new DebugString(); try { if (debugDetails != null) { for (final DebuggableWithTitle info : debugDetails) { debug.appendTitle(info.debugTitle()); debug.indent(); info.debugData(debug); debug.unindent(); } } } catch (final RuntimeException e) { debug.appendException(e); } }
/** * Append the specified text, then start a new line. */ @Override public void appendln(final String text) { appendIndent(); append(text); appendln(); newLine = true; }
@Override public void startSection(final String title) { appendTitleString(section++ + ". " + title); indent(); }
/** * @see #specification(ObjectAdapter, DebugBuilder) * @see #specification(ObjectSpecification, DebugBuilder) */ public static String specification(final ObjectAdapter adapter) { final DebugBuilder debugBuilder = new DebugString(); specification(adapter, debugBuilder); return debugBuilder.toString(); }
public void takeSnapshot() { if (!LOG.isDebugEnabled()) { return; } final DebugString debug = new DebugString(); debug(debug); debug.indent(); debug.appendln(); debug(debug, getPersistenceSession()); if (getCurrentTransaction() != null) { debug(debug, getCurrentTransaction().getUpdateNotifier()); debug(debug, getCurrentTransaction().getMessageBroker()); } debugSnapshot = debug.toString(); LOG.debug(debugSnapshot); }
public String debugServices() { final DebugString debug = new DebugString(); final List<Object> services = getServices(); for (final Object service : services) { debug.append(service.getClass().getName()); debug.append("\n"); } return debug.toString().replaceAll("\n", "<br>"); }
public static void debug(final DebugString debug) { debug.appendTitle("Image Lookup"); debug.indent(); final Iterator keys = images.keySet().iterator(); while (keys.hasNext()) { final Object key = keys.next(); final Object value = images.get(key); debug.appendln(key + " -> " + value); } debug.unindent(); }
/** * Append the specified object by calling it <code>toString()</code> method. */ @Override public void append(final Object object) { if (object instanceof DebuggableWithTitle) { indent(); appendTitle(((DebuggableWithTitle) object).debugTitle()); ((DebuggableWithTitle) object).debugData(this); unindent(); } else { appendIndent(); string.append(object); } }
@Override public void appendPreformatted(final String label, final String text) { appendln(label, text); };
public String getDebug() { return debug.toString(); }
/** * Append the elements of the specified array with the specified label. Each * element is appended on its own line, and a new line is added after the * last element. */ @Override public void appendln(final String label, final Object[] object) { if (object.length == 0) { appendln(label, "empty array"); } else { appendln(label, object[0]); for (int i = 1; i < object.length; i++) { string.append(spaces(COLUMN_SPACING + 2)); string.append(object[i]); string.append('\n'); } newLine = true; } }
/** * @see #adapter(ObjectAdapter, DebugBuilder) */ public static String adapter(final ObjectAdapter adapter) { final DebugBuilder debugBuilder = new DebugString(); adapter(adapter, debugBuilder); return debugBuilder.toString(); }
@Override public void appendPreformatted(final String text) { appendln(text); }
@Override public String debugData() { final DebugString debugString = new DebugString(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
@Override public String debugData() { final DebugString debugString = new DebugString(); debugString.indent(); debugString.indent(); getFacetedMethod().debugData(debugString); return debugString.toString(); }
/** * Creates an ascii object graph diagram for the specified object, up to * three levels deep. * * @see #graph(ObjectAdapter, AuthenticationSession, DebugBuilder) */ public static String graph(final ObjectAdapter adapter, final AuthenticationSession authenticationSession) { debugBuilder = new DebugString(); graph(adapter, authenticationSession, debugBuilder); return debugBuilder.toString(); }
/** * Append the specified number with the specified label, then start a new * line. */ @Override public void appendln(final String label, final double value) { appendln(label, String.valueOf(value)); }