Module java.base
Package java.lang.classfile

# Enum ClassFile.DeadLabelsOption

≠
public static final enum DeadLabelsOption
extends java.lang.Enum<java.lang.classfile.ClassFile.DeadLabelsOption>
implements java.lang.classfile.ClassFile.Option
Comparing master and cf

All Implemented Interfaces:
  `Serializable, ClassFile.Option, Comparable<ClassFile.DeadLabelsOption>, Constable`

Enclosing interface:
  `ClassFile`

public static enum ClassFile.DeadLabelsOption extends Enum<ClassFile.DeadLabelsOption> implements ClassFile.Option
Option The option describing whether to filter unresolved labels. Default unbound labels and drop their enclosing structures if possible. The default is `Moved to a link with destination #FAIL_ON_DEAD_LABELS.FAIL_ON_DEAD_LABELS` Moved to a link with destination #FAIL_ON_DEAD_LABELS. to throw IllegalArgumentException when any `ExceptionCatch` , `LocalVariableInfo` , `LocalVariableTypeInfo` , or `CharacterRangeInfo` reference to unresolved `Label` during bytecode serializationfail fast with an `IllegalArgumentException` when a `PseudoInstruction` refers to an unbound label during bytecode generation.

The affected `PseudoInstruction` s include `ExceptionCatch` , `LocalVariable` , `LocalVariableType` , and `CharacterRange` Moved to a paragraph.. Setting this option to `Moved to a paragraph.Moved to a link with destination #DROP_DEAD_LABELS.DROP_DEAD_LABELS` Moved to a paragraph.Moved to a link with destination #DROP_DEAD_LABELS. Moved to a paragraph.filters

the above elements instead.

these pseudo-instructions from a `CodeBuilder` instead. Note that instructions, such as `BranchInstruction` , with unbound labels always fail-fast with an `IllegalArgumentException` .Moved to a paragraph.

Since:
  24
See Also:
  Moved to a definition list with class notes.Moved to a definition.Moved to an unordered list with class tag-list.
  - `ClassFile.DebugElementsOption`

## Enum Constants

- ≠
  DROP_DEAD_LABELS
  Comparing master and cf

  ### DROP_DEAD_LABELS

  public static final ClassFile.DeadLabelsOption DROP_DEAD_LABELS
  Filter unresolved labels `PseudoInstruction` s with unbound labels. Note that instructions with unbound labels still cause an `IllegalArgumentException` .
- ≠
  FAIL_ON_DEAD_LABELS
  Comparing master and cf

  ### FAIL_ON_DEAD_LABELS

  public static final ClassFile.DeadLabelsOption FAIL_ON_DEAD_LABELS
  Fail fast on unresolved labels unbound labels. This also ensures the accuracy of the generated `class` files.

## Methods

- =
  public static java.lang.classfile.ClassFile.DeadLabelsOption valueOf(java.lang.String arg0)
- =
  public static java.lang.classfile.ClassFile.DeadLabelsOption[] values()

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
ClassFile.DeadLabelsOption |  |  |  |  |  |  | 8 | 4 | 7 | 19
DROP_DEAD_LABELS |  |  |  |  |  |  | 3 | 1 |  | 4
FAIL_ON_DEAD_LABELS |  |  |  |  |  |  | 3 | 1 |  | 4
Total |  |  |  |  |  |  | 14 | 6 | 7 | 27