1 21 22 package org.armedbear.j.jdb; 23 24 import org.armedbear.j.FastStringBuffer; 25 import org.armedbear.j.Log; 26 import org.xml.sax.Attributes ; 27 28 public final class BreakpointSpecification 29 { 30 private final String className; 31 private final String methodName; 32 private final String fileName; 33 private final int lineNumber; 34 35 public BreakpointSpecification(Attributes attributes) 36 { 37 className = attributes.getValue("className"); 38 methodName = attributes.getValue("methodName"); 39 fileName = attributes.getValue("fileName"); 40 int n = 0; 41 String s = attributes.getValue("lineNumber"); 42 if (s != null) { 43 try { 44 n = Integer.parseInt(s); 45 } 46 catch (NumberFormatException e) { 47 Log.error(e); 48 } 49 } 50 lineNumber = n; 51 } 52 53 public String getClassName() 54 { 55 return className; 56 } 57 58 public String getMethodName() 59 { 60 return methodName; 61 } 62 63 public String getFileName() 64 { 65 return fileName; 66 } 67 68 public int getLineNumber() 69 { 70 return lineNumber; 71 } 72 73 public String toString() 75 { 76 final String separator = System.getProperty("line.separator"); 77 FastStringBuffer sb = new FastStringBuffer("BreakpointSpecification: "); 78 sb.append(separator); 79 sb.append(" className = " + className); 80 sb.append(separator); 81 sb.append(" methodName = " + methodName); 82 sb.append(separator); 83 sb.append(" fileName = " + fileName); 84 sb.append(separator); 85 sb.append(" lineNumber = " + lineNumber); 86 return sb.toString(); 87 } 88 } 89 | Popular Tags |