public enum TimerState extends java.lang.Enum<TimerState>
Timer. The timer
mechanism follows a simple state machine of start-finish or
start-suspend-resume-finish notifications (further unmatching events are
ignored).| Enum Constant and Description |
|---|
FINISH
Finish the timer, notify observers and clear the timer storage
(
TimerPosition.END). |
RESUME
Resume time recording after a previous
SUSPEND
(TimerPosition.BEGINNING). |
RESUME_SUSPEND
Resume and stop in one method / constructor
(
TimerPosition.BOTH). |
START
Start the time recording at the given point of execution
(
TimerPosition.BEGINNING). |
START_FINISH
Start and finish the timer in one method / constructor
(
TimerPosition.BOTH). |
SUSPEND
Suspend the time recording temporarily in order to
resume it later (TimerPosition.END). |
SUSPEND_RESUME
Suspend and resume in one method / constructor
(
TimerPosition.BOTH). |
| Modifier and Type | Field and Description |
|---|---|
private TimerPosition |
defaultPosition
Stores the default position for affecting the instrumented system.
|
| Modifier and Type | Method and Description |
|---|---|
TimerPosition |
getDefaultPosition()
Returns the default position for affecting instrumented code.
|
static TimerState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TimerState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimerState START
TimerPosition.BEGINNING).public static final TimerState SUSPEND
resume it later (TimerPosition.END).public static final TimerState RESUME
SUSPEND
(TimerPosition.BEGINNING).public static final TimerState FINISH
TimerPosition.END).public static final TimerState START_FINISH
TimerPosition.BOTH).public static final TimerState RESUME_SUSPEND
TimerPosition.BOTH).public static final TimerState SUSPEND_RESUME
TimerPosition.BOTH).private TimerPosition defaultPosition
public static TimerState[] values()
for (TimerState c : TimerState.values()) System.out.println(c);
public static TimerState valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic TimerPosition getDefaultPosition()