static StringBuffer addFilterAttribute( StringBuffer filter, String attr, Object value, boolean escapeWildCard) { if (value instanceof VersionRange) { VersionRange range = (VersionRange) value; filter.append(range.toFilterString(attr)); } else { filter .append('(') .append(attr) .append('=') .append(escapeValue(value, escapeWildCard)) .append(')'); } return filter; }
/** * Print a debug message to the console. Pre-pend the message with the current date and the name * of the current thread. */ public static void debug(String message) { StringBuffer buffer = new StringBuffer(); buffer.append(new Date(System.currentTimeMillis())); buffer.append(" - ["); // $NON-NLS-1$ buffer.append(Thread.currentThread().getName()); buffer.append("] "); // $NON-NLS-1$ buffer.append(message); System.out.println(buffer.toString()); }