Event annotation, determines if an event should be enabled by default.
 
 The event can be enabled programmatically, or on command line when needed,
 for example:
 
If an event doesn't have the annotation, then by default the event is enabled.
 The following example shows how the Enabled annotation can be used to
 create a disabled event. A disabled event will at most have the overhead of
 an allocation, or none if the runtime JIT compiler is able to eliminate it.
 
@Name("StopWatch")
@Label("Stop Watch")
@Category("Debugging")
@StackTrace(false)
@Enabled(false)
static public class StopWatchEvent extends Event {
}
public void update() {
    StopWatchEvent e = new StopWatchEvent();
    e.begin();
    ...
    e.commit();
}
java -XX:StartFlightRecording:StopWatch#enabled=true ...
- Since:
- 9
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionbooleanReturnstrueif by default the event should be enabled,falseotherwise.
- 
Field SummaryFields
- 
Field Details- 
NAMESetting name"enabled", signifies that the event should be recorded.- See Also:
 
 
- 
- 
Element Details- 
valueboolean valueReturnstrueif by default the event should be enabled,falseotherwise.- Returns:
- trueif by default the event should be enabled by default,- falseotherwise
 - Default:
- true
 
 
-