128 return this; 129 } 130 131 132 public static JdbCommand run(String ... params) { 133 return new JdbCommand("run " + Arrays.stream(params).collect(Collectors.joining(" "))); 134 } 135 public static JdbCommand cont() { 136 return new JdbCommand("cont"); 137 } 138 public static JdbCommand dump(String what) { 139 return new JdbCommand("dump " + what); 140 } 141 public static JdbCommand quit() { 142 // the command suppose jdb terminates 143 return new JdbCommand("quit").allowExit(); 144 } 145 public static JdbCommand stopAt(String targetClass, int lineNum) { 146 return new JdbCommand("stop at " + targetClass + ":" + lineNum); 147 } 148 public static JdbCommand stopIn(String targetClass, String methodName) { 149 return new JdbCommand("stop in " + targetClass + "." + methodName); 150 } 151 152 // clear <class id>:<line> -- clear a breakpoint at a line 153 public static JdbCommand clear(String targetClass, int lineNum) { 154 return new JdbCommand("clear " + targetClass + ":" + lineNum); 155 } 156 157 // exception type used by catch/ignore 158 public enum ExType{ 159 uncaught, 160 caught, 161 all 162 } 163 public static JdbCommand catch_(String classId) { 164 return new JdbCommand("catch " + classId); 165 } 166 public static JdbCommand catch_(ExType eType, String classId) { 167 return catch_(eType.toString() + " " + classId); | 128 return this; 129 } 130 131 132 public static JdbCommand run(String ... params) { 133 return new JdbCommand("run " + Arrays.stream(params).collect(Collectors.joining(" "))); 134 } 135 public static JdbCommand cont() { 136 return new JdbCommand("cont"); 137 } 138 public static JdbCommand dump(String what) { 139 return new JdbCommand("dump " + what); 140 } 141 public static JdbCommand quit() { 142 // the command suppose jdb terminates 143 return new JdbCommand("quit").allowExit(); 144 } 145 public static JdbCommand stopAt(String targetClass, int lineNum) { 146 return new JdbCommand("stop at " + targetClass + ":" + lineNum); 147 } 148 public static JdbCommand stopThreadAt(String targetClass, int lineNum) { 149 return new JdbCommand("stop thread at " + targetClass + ":" + lineNum); 150 } 151 public static JdbCommand stopIn(String targetClass, String methodName) { 152 return new JdbCommand("stop in " + targetClass + "." + methodName); 153 } 154 155 // clear <class id>:<line> -- clear a breakpoint at a line 156 public static JdbCommand clear(String targetClass, int lineNum) { 157 return new JdbCommand("clear " + targetClass + ":" + lineNum); 158 } 159 160 // exception type used by catch/ignore 161 public enum ExType{ 162 uncaught, 163 caught, 164 all 165 } 166 public static JdbCommand catch_(String classId) { 167 return new JdbCommand("catch " + classId); 168 } 169 public static JdbCommand catch_(ExType eType, String classId) { 170 return catch_(eType.toString() + " " + classId); |