Enum Class LogicalBreakpoint.State
- All Implemented Interfaces:
Serializable,Comparable<LogicalBreakpoint.State>,Constable
- Enclosing interface:
LogicalBreakpoint
Because a breakpoint is comprised of possibly many locations on target or among several targets, as well as a saved bookmark in a program, the "state" can get fairly complex. This is an attempt to enumerate these states while preserving enough information about the breakpoint to display it in various contexts, hopefully informing more than confusing.
In essence, this is the cross product of LogicalBreakpoint.Mode and LogicalBreakpoint.Consistency with an
additional NONE option.
A breakpoint is simply ENABLED or DISABLED if it is maped and all its
locations and bookmark agree. Ideally, all breakpoints would be in one of these two states.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe breakpoint is disabled, and all locations and its bookmark agreeThe breakpoint is enabled, and all locations and its bookmark agreeThe breakpoint is disabled, and all locations agree, but the bookmark is absent or disagrees.The breakpoint is enabled, and all locations agree, but the bookmark is absent or disagrees.The breakpoint is terribly inconsistent: its locations disagree, and the bookmark may be absent.The breakpoint is saved as disabled, and one or more trace locations are absent.The breakpoint is saved as enabled, but one or more trace locations are absent.There are multiple logical breakpoints at this address, and they are all saved, but at least one is ineffective; furthermore, some are enabled, and some are disabled.There are multiple logical breakpoints at this address, and they are all saved and effective, but some are enabled, and some are disabled.A placeholder state, usually indicating the logical breakpoint should not exist -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal Iconfinal LogicalBreakpoint.Modestatic final List<LogicalBreakpoint.State> -
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalBreakpoint.StatefromFields(LogicalBreakpoint.Mode mode, LogicalBreakpoint.Consistency consistency) getToggled(boolean mapped) Get the desired state were the logical breakpoint to be toggledbooleanbooleanbooleanbooleanisNormal()For logical breakpoints which appear at the same address, compose their statestatic LogicalBreakpoint.StateFor logical breakpoints which appear at the same address, compose their statestatic LogicalBreakpoint.StateReturns the enum constant of this class with the specified name.static LogicalBreakpoint.State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
A placeholder state, usually indicating the logical breakpoint should not existThis state should not ever be assigned to any actual breakpoint, except if that breakpoint is ephemeral and about to be removed. This value may appear during computations and is a suitable default placeholder for editors and renderers.
-
ENABLED
The breakpoint is enabled, and all locations and its bookmark agree -
DISABLED
The breakpoint is disabled, and all locations and its bookmark agree -
MIXED
There are multiple logical breakpoints at this address, and they are all saved and effective, but some are enabled, and some are disabled. -
INEFFECTIVE_ENABLED
The breakpoint is saved as enabled, but one or more trace locations are absent. -
INEFFECTIVE_DISABLED
The breakpoint is saved as disabled, and one or more trace locations are absent. -
INEFFECTIVE_MIXED
There are multiple logical breakpoints at this address, and they are all saved, but at least one is ineffective; furthermore, some are enabled, and some are disabled. -
INCONSISTENT_ENABLED
The breakpoint is enabled, and all locations agree, but the bookmark is absent or disagrees. -
INCONSISTENT_DISABLED
The breakpoint is disabled, and all locations agree, but the bookmark is absent or disagrees. -
INCONSISTENT_MIXED
The breakpoint is terribly inconsistent: its locations disagree, and the bookmark may be absent.
-
-
Field Details
-
VALUES
-
mode
-
consistency
-
display
-
icon
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromFields
public static LogicalBreakpoint.State fromFields(LogicalBreakpoint.Mode mode, LogicalBreakpoint.Consistency consistency) -
sameAdddress
For logical breakpoints which appear at the same address, compose their stateThis can happen when two logical breakpoints, having different attributes (size, kinds, etc.) coincide at the same address. This should be used only when deciding how to mark or choose actions for the address.
- Parameters:
that- the other state.- Returns:
- the composed state
-
sameAddress
For logical breakpoints which appear at the same address, compose their state- Parameters:
col- a collection of states derived from logical breakpoints at the same address- Returns:
- the composed state
- See Also:
-
getToggled
Get the desired state were the logical breakpoint to be toggledThe expected "action" when toggling a breakpoint may vary depending on whether or not the breakpoint is mapped, and the notion of "mapped" may vary depending on other settings. In general, if the breakpoint is not in a consistent, enabled, and effective state, but it could be, then toggling it should attempt to make it so. If it is consistent, enabled, and effective, then toggling it should make it consistent, disabled, and effective. If it is not mapped, the state should toggle between enabled and disabled, but ineffective.
This will always return one of
ENABLEDorDISABLED, indicating what action should be taken on the logical breakpoint. A breakpoint that is ineffective, because it is not mapped, will remain ineffective.- Parameters:
mapped- true if the breakpoint is mapped, as interpreted by the action context- Returns:
- the resulting state
-
isNormal
public boolean isNormal() -
isEnabled
public boolean isEnabled() -
isEffective
public boolean isEffective() -
isIneffective
public boolean isIneffective()
-