|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kahina.core.breakpoint.KahinaBreakpoint
public class KahinaBreakpoint
A breakpoint based on a tree pattern as used by the Kahina breakpoint system.
The main purpose of this class is to combine a TreePattern with meta information such as a type, a signal color, a name and an activation status.
It constitutes the form in which breakpoints are most transparent and accessible to the user.
The breakpoint editor as well as import and export formats build on breakpoints in this form.
Within the breakpoint system, a KahinaBreakpoint is compiled into a TreeAutomaton which is then used for pattern matching.
The resulting TreeAutomaton will however still contain a reference to this object for meta data access.
| Constructor Summary | |
|---|---|
KahinaBreakpoint(int type)
Class constructor specifying the breakpoint type as an integer constant. |
|
| Method Summary | |
|---|---|
void |
activate()
Activates this breakpoint, causing the messaging system to announce its matches. |
TreeAutomaton |
compile()
Compiles this breakpoint into a tree automaton which is then returned. |
void |
deactivate()
Deactivates this breakpoint, preventing the messaging system from announcing its matches. |
String |
exportXML(boolean asFile)
Generates an XML representation of this breakpoint, optionally featuring an XML header. |
String |
getName()
Gets the name of the breakpoint as used by various GUI components. |
TreePattern |
getPattern()
Gets the tree pattern associated with this breakpoint. |
Color |
getSignalColor()
Gets the signal color used for highlighting matches of this breakpoint. |
int |
getType()
Gets the type of this breakpoint. |
static KahinaBreakpoint |
importXML(Element breakpointNode)
Constructs a breakpoint from an XML representation as produced by exportXML. |
boolean |
isActive()
Checks whether this breakpoint is active. |
void |
setName(String name)
Sets the name of the breakpoint that will be used by various GUI components. |
void |
setPattern(TreePattern pattern)
Associates this breakpoint with a new tree pattern. |
void |
setSignalColor(Color signalColor)
Sets the signal color used for highlighting matches of this breakpoint. |
void |
setType(int type)
Changes the type of this breakpoint. |
String |
toString()
Returns the breakpoint's name, prefixed by '#' if it is inactive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public KahinaBreakpoint(int type)
The breakpoint starts out with the following default values:
name - "Breakpoint " + a number
signalColor - a random RGB color
active - true (= activated)
pattern - the empty pattern
type - one of the constant values in KahinaBreakpointType| Method Detail |
|---|
public TreeAutomaton compile()
public String getName()
public void setName(String name)
name - a user-readable name for this breakpointpublic boolean isActive()
public void activate()
public void deactivate()
public Color getSignalColor()
public void setSignalColor(Color signalColor)
signalColor - the signal color to be associated with this breakpointpublic String toString()
toString in class Objectpublic TreePattern getPattern()
public void setPattern(TreePattern pattern)
pattern - the tree pattern to be associated with this breakpointpublic int getType()
public void setType(int type)
type - one of the constant values in KahinaBreakpointTypepublic String exportXML(boolean asFile)
asFile - determines whether the result features an XML header
public static KahinaBreakpoint importXML(Element breakpointNode)
exportXML.
breakpointNode - an XML DOM element with name "breakpoint" as produced when parsing the result of exportXML
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||