1 24 package org.aspectj.debugger.base; 25 26 public class Debug { 27 28 private static Options options; 29 private static boolean debug; 30 31 public static void setOptions(Options options) { 32 Debug.options = options; 33 debug = options.isSet("debug"); 34 debug("...debugging..."); 35 } 36 37 public static void debug(Object owner, Object msg) { 38 debug("[" + owner + "] " + msg); 39 } 40 41 public static void debug(Object msg) { 42 if (debug) outln(msg); 43 } 44 45 private final static String newline = System.getProperty("line.separator"); 46 private static void out(Object msg) { 47 System.err.print(msg); 48 } 49 private static void outln(Object msg) { 50 out(msg); 51 out(newline); 52 } 53 54 55 } 56 | Popular Tags |