1 55 56 package org.apache.bsf.util; 57 58 import org.apache.bsf.*; 59 60 87 public class BreakPoint { 88 89 protected int m_brkptId; 90 protected int m_lineno; 91 protected int m_offset; 92 protected boolean m_lineDefined; 93 94 protected DocumentCell m_cell; 95 public BreakPoint(DocumentCell cell, int brkptid) { 97 super(); 98 m_cell = cell; 99 m_brkptId = brkptid; 100 m_lineno = -1; 101 m_lineDefined = true; 102 } 103 public boolean isLineDefined() { 105 return m_lineDefined; 106 } 107 public int getId() { 109 return m_brkptId; 110 } 111 public int getLineNo() { 113 if (m_lineDefined) 114 return m_lineno; 115 else 116 return -1; 117 } 118 public int getOffset() { 120 if (m_lineDefined) 121 return -1; 122 else 123 return m_offset; 124 } 125 public void setLineNo(int lineno) { 127 m_lineno = lineno; 128 } 129 public void setOffset(int offset) { 131 m_offset = offset; 132 } 133 public String toString() { 134 if (m_lineDefined) 135 return "line #"+Integer.toString(m_lineno); 136 else 137 return "offset "+Integer.toString(m_offset); 138 } 139 } 140 | Popular Tags |