com.bluemarsh.jswat.breakpoint
Class BreakpointGroup

java.lang.Object
  |
  +--com.bluemarsh.jswat.breakpoint.BreakpointGroup
All Implemented Interfaces:
java.io.Serializable

public class BreakpointGroup
extends java.lang.Object
implements java.io.Serializable

Class BreakpointGroup acts as a container for breakpoints. In addition to breakpoints, a group may hold other breakpoint groups.

Author:
Nathan Fiedler
See Also:
Serialized Form

Field Summary
protected  java.util.List breakpointList
          List of breakpoints in this group.
protected  java.util.List groupList
          List of breakpoint groups in this group.
protected  java.lang.String groupName
          Name of our breakpoint group.
protected  boolean isEnabled
          True if this breakpoint group is enabled.
protected  BreakpointGroup parentGroup
          The breakpoint group to which we belong (always non-null).
 
Constructor Summary
BreakpointGroup()
          Creates a BreakpointGroup with the default parameters.
BreakpointGroup(java.lang.String name)
          Creates a BreakpointGroup with the default parameters.
 
Method Summary
 void addBreakpoint(Breakpoint bp)
          Adds the given breakpoint to this breakpoint group.
 void addBreakpointGroup(BreakpointGroup bg)
          Adds the given breakpoint group to this breakpoint group.
 int breakpointCount()
          Returns a count of the breakpoints in this group, including the counts from this group's subgroups.
 int breakpointCount(boolean recurse)
          Returns a count of the breakpoints in this group.
 java.util.Iterator breakpoints()
          Returns an iterator over the set of breakpoints in this group (not including subgroups).
 java.util.Iterator breakpoints(boolean recurse)
          Returns an iterator over the set of breakpoints in this group.
 java.lang.String getName()
          Returns the name of this breakpoint group.
 BreakpointGroup getParent()
          Gets the breakpoint group that is the parent of this group.
 Session getSession()
          Gets the Session that owns this group.
 int groupCount()
          Returns a count of the breakpoint groups in this group, including the counts from this group's subgroups.
 int groupCount(boolean recurse)
          Returns a count of the groups in this group.
 java.util.Iterator groups()
          Returns an iterator over the set of groups in this group (not including subgroups).
 java.util.Iterator groups(boolean recurse)
          Returns an iterator over the set of groups in this group.
 boolean isEnabled()
          Returns true if this breakpoint group and all of its ancestors are enabled.
 void removeBreakpoint(Breakpoint bp)
          Removes the given breakpoint from this breakpoint group.
 void removeBreakpointGroup(BreakpointGroup bg)
          Removes the given breakpoint group from this breakpoint group.
 void reset()
          Resets all the breakpoints in this group.
 void setEnabled(boolean enabled)
          Enables or disables this breakpoint group, according to the parameter.
 void setName(java.lang.String name)
          Changes the name of this breakpoint group to that which is given.
 void setParent(BreakpointGroup parent)
          Sets the breakpoint group that is to be the parent of this group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupName

protected java.lang.String groupName
Name of our breakpoint group. Used for display.

isEnabled

protected boolean isEnabled
True if this breakpoint group is enabled.

groupList

protected java.util.List groupList
List of breakpoint groups in this group.

breakpointList

protected java.util.List breakpointList
List of breakpoints in this group.

parentGroup

protected BreakpointGroup parentGroup
The breakpoint group to which we belong (always non-null).
Constructor Detail

BreakpointGroup

public BreakpointGroup()
Creates a BreakpointGroup with the default parameters.

BreakpointGroup

public BreakpointGroup(java.lang.String name)
Creates a BreakpointGroup with the default parameters.
Parameters:
name - group name.
Method Detail

addBreakpoint

public void addBreakpoint(Breakpoint bp)
Adds the given breakpoint to this breakpoint group.
Parameters:
bp - breakpoint to add to this group.

addBreakpointGroup

public void addBreakpointGroup(BreakpointGroup bg)
Adds the given breakpoint group to this breakpoint group.
Parameters:
bg - breakpoint group to add to this group.

breakpointCount

public int breakpointCount()
Returns a count of the breakpoints in this group, including the counts from this group's subgroups.
Returns:
number of breakpoints in this group and its subgroups.
See Also:
breakpointCount(boolean)

breakpointCount

public int breakpointCount(boolean recurse)
Returns a count of the breakpoints in this group.
Parameters:
recurse - true to include subgroup counts, false to ignore this group's subgroups.
Returns:
number of breakpoints in this group.
See Also:
breakpointCount()

breakpoints

public java.util.Iterator breakpoints()
Returns an iterator over the set of breakpoints in this group (not including subgroups).
Returns:
Iterator over the breakpoints.

breakpoints

public java.util.Iterator breakpoints(boolean recurse)
Returns an iterator over the set of breakpoints in this group.
Parameters:
recurse - true to recurse through all the groups.
Returns:
Iterator over the breakpoints.

getName

public java.lang.String getName()
Returns the name of this breakpoint group.
Returns:
name of this breakpoint group.

getParent

public BreakpointGroup getParent()
Gets the breakpoint group that is the parent of this group.
Returns:
parent of this breakpoint group.

getSession

public Session getSession()
Gets the Session that owns this group.
Returns:
owning Session.

groupCount

public int groupCount()
Returns a count of the breakpoint groups in this group, including the counts from this group's subgroups.
Returns:
number of breakpoint groups in this group.

groupCount

public int groupCount(boolean recurse)
Returns a count of the groups in this group.
Parameters:
recurse - true to include subgroup counts, false to ignore this group's subgroups.
Returns:
number of groups in this group.
See Also:
groupCount()

groups

public java.util.Iterator groups()
Returns an iterator over the set of groups in this group (not including subgroups).
Returns:
Iterator over the groups.

groups

public java.util.Iterator groups(boolean recurse)
Returns an iterator over the set of groups in this group.
Parameters:
recurse - true to iterate over all subgroups.
Returns:
Iterator over the groups.

isEnabled

public boolean isEnabled()
Returns true if this breakpoint group and all of its ancestors are enabled.
Returns:
true if this group and all of its ancestors are enabled, false otherwise.

removeBreakpoint

public void removeBreakpoint(Breakpoint bp)
Removes the given breakpoint from this breakpoint group.
Parameters:
bp - breakpoint to remove from this group.

removeBreakpointGroup

public void removeBreakpointGroup(BreakpointGroup bg)
Removes the given breakpoint group from this breakpoint group.
Parameters:
bg - breakpoint group to remove from this group.

reset

public void reset()
Resets all the breakpoints in this group.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables this breakpoint group, according to the parameter.
Parameters:
enabled - true if breakpoint should be enabled, false if breakpoint should be disabled.

setName

public void setName(java.lang.String name)
Changes the name of this breakpoint group to that which is given.
Parameters:
name - new name for this breakpoint group.

setParent

public void setParent(BreakpointGroup parent)
Sets the breakpoint group that is to be the parent of this group.
Parameters:
parent - new parent of this group.