|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sofya.ed.structural.BranchInstrumentationConfiguration
public class BranchInstrumentationConfiguration
A branch instrumentation configuration stores the types of branches that have been selected for instrumentation or observation by an event dispatcher.
Field Summary | |
---|---|
protected boolean |
ready
Flag indicating whether the configuration is considered in a ready state. |
Constructor Summary | |
---|---|
BranchInstrumentationConfiguration()
Creates a new branch configuration. |
Method Summary | |
---|---|
boolean |
areCallBranchesActive()
Reports whether call branches are selected. |
boolean |
areEntryBranchesActive()
Reports whether entry branches are selected. |
boolean |
areIfBranchesActive()
Reports whether if branches are selected. |
boolean |
areSummaryBranchesActive()
Reports whether summary branches are selected. |
boolean |
areSwitchBranchesActive()
Reports whether switch branches are selected. |
boolean |
areThrowsBranchesActive()
Reports whether throws branches are selected. |
java.util.List |
configure(java.util.List params)
Configures this component from command line parameters. |
int |
getTypeFlags()
Gets the bitmask corresponding to the types of branches currently selected. |
boolean |
isReady()
Reports whether this component is ready for the event dispatcher to begin dispatching events. |
void |
register(EventDispatcherConfiguration edConfig)
Registers this component with the event dispatcher. |
void |
release()
Notifies this component that its current lifecycle has expired and that it should commit any stored state and release resources. |
void |
reset()
Notifies this component to clear its configuration and reset any internal state. |
void |
setCallBranchesActive(boolean enable)
Sets whether call branches are selected. |
void |
setEntryBranchesActive(boolean enable)
Sets whether entry branches are selected. |
void |
setIfBranchesActive(boolean enable)
Sets whether if branches are selected. |
void |
setSummaryBranchesActive(boolean enable)
Sets whether summary branches are selected. |
void |
setSwitchBranchesActive(boolean enable)
Sets whether switch branches are selected. |
void |
setThrowsBranchesActive(boolean enable)
Sets whether throws branches are selected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean ready
Constructor Detail |
---|
public BranchInstrumentationConfiguration()
No branches are activated by default.
Method Detail |
---|
public void register(EventDispatcherConfiguration edConfig)
ActiveComponent
Registers this component with the event dispatcher.
This method is called each time an event dispatcher prepares to
initiate a new event stream, caused by a call to
ProgramEventDispatcher.startDispatcher()
.
register
in interface ActiveComponent
edConfig
- The current configuration of system global resources
and settings that the component may (and should) use as appropriate.public java.util.List configure(java.util.List params)
ActiveComponent
Configures this component from command line parameters.
This method provides a component the opportunity to define and process command line parameters required to configure itself. Components participate in a processing chain, initiated in Sofya-provided event dispatchers by calling this method on the processing strategy. The processing strategies provided by Sofya in turn invoke this method on any listeners implementing this interface.
configure
in interface ActiveComponent
params
- A list of command line tokens that have not yet
been processed by any previous components.
public void reset()
ActiveComponent
Notifies this component to clear its configuration and reset any internal state.
Calls to this method are chained similary to the ActiveComponent.configure(java.util.List)
method. This method is invoked by the event dispatcher prior to
reconfiguration. Normally it should be used to clear any configuration
state to avoid using stale values.
reset
in interface ActiveComponent
public boolean isReady()
ActiveComponent
Reports whether this component is ready for the event dispatcher to begin dispatching events.
Calls to this method are chained similarly to the ActiveComponent.configure(java.util.List)
method. The event dispatcher will fail with an error if a client
invokes ProgramEventDispatcher.startDispatcher()
when any
attached component returns false
from this method.
isReady
in interface ActiveComponent
true
if this component is ready for the event
dispatcher to begin dispatching events, false
otherwise.public void release()
ActiveComponent
Notifies this component that its current lifecycle has expired and that it should commit any stored state and release resources.
Calls to this method are chained similary to the ActiveComponent.configure(java.util.List)
method. This method is invoked directly by a client of the event
dispatcher. Normally, it should be used to release any resources that
were required to persist over multiple runs of the event dispatcher.
release
in interface ActiveComponent
public boolean areIfBranchesActive()
if
branches are selected.
true
if if
branches are selected,
false
otherwise.public void setIfBranchesActive(boolean enable)
if
branches are selected.
enable
- true
to select if
branches,
false
to ignore.public boolean areSwitchBranchesActive()
switch
branches are selected.
true
if switch
branches are selected,
false
otherwise.public void setSwitchBranchesActive(boolean enable)
switch
branches are selected.
enable
- true
to select switch
branches,
false
to ignore.public boolean areThrowsBranchesActive()
throws
branches are selected.
true
if throws
branches are selected,
false
otherwise.public void setThrowsBranchesActive(boolean enable)
throws
branches are selected.
enable
- true
to select throws
branches,
false
to ignore.public boolean areCallBranchesActive()
true
if call branches are selected,
false
otherwise.public void setCallBranchesActive(boolean enable)
enable
- true
to select call branches,
false
to ignore.public boolean areEntryBranchesActive()
true
if entry branches are selected,
false
otherwise.public void setEntryBranchesActive(boolean enable)
enable
- true
to select entry branches,
false
to ignore.public boolean areSummaryBranchesActive()
true
if summary branches are selected,
false
otherwise.public void setSummaryBranchesActive(boolean enable)
enable
- true
to select summary branches,
false
to ignore.public int getTypeFlags()
Used for communicating configuration information to certain other components. To be phased out at a future date.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |