Enabled (Java SE 17 & JDK 17)
Description: declaration: module: jdk.jfr, package: jdk.jfr, annotation type: Enabled
Keywords: jdk.jfr.Enabled class

Module jdk.jfr
Package jdk.jfr

# Annotation Interface Enabled

@Target(TYPE) @Retention(RUNTIME) @Inherited public @interface Enabled
Event annotation, determines if an event should be enabled by default.

If an event doesn't have the annotation, then by default the event is enabled.

Since:
  9

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `boolean`
  `value`
  Returns `true` if by default the event should be enabled, `false` otherwise.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `NAME`
  Setting name `"enabled"`, signifies that the event should be recorded.

- ## Field Details

  - ### NAME

    static final String NAME
    Setting name `"enabled"`, signifies that the event should be recorded.
    See Also:
      - Constant Field Values

- ## Element Details

  - ### value

    boolean value
    Returns `true` if by default the event should be enabled, `false` otherwise.
    Returns:
      `true` if by default the event should be enabled by default, `false` otherwise
    Default:
      true