Serializable, ClassFile.Option, Comparable<ClassFile.DeadCodeOption>, ConstableClassFilepublic static enum ClassFile.DeadCodeOption extends Enum<ClassFile.DeadCodeOption> implements ClassFile.Option
PATCH_DEAD_CODE to automatically patch unreachable code and generate a valid stack map entry for the patched code. The stack map generation process may fail when it encounters unreachable code and KEEP_DEAD_CODE is set. In such cases, users should set ClassFile.StackMapsOption.DROP_STACK_MAPS and provide their own stack maps that passes verification (JVMS 4.10.1).
Enum.EnumDesc<E>
| Enum Constant | Description |
|---|---|
KEEP_DEAD_CODE |
Keep the unreachable code for the accuracy of the generated
class file. |
PATCH_DEAD_CODE |
Patch unreachable code with dummy code, and generate valid dummy stack map entries. |
| Modifier and Type | Method | Description |
|---|---|---|
static ClassFile.DeadCodeOption |
valueOf |
Returns the enum constant of this class with the specified name. |
static ClassFile.DeadCodeOption[] |
values() |
Returns an array containing the constants of this enum class, in the order they are declared. |
public static final ClassFile.DeadCodeOption PATCH_DEAD_CODE
public static final ClassFile.DeadCodeOption KEEP_DEAD_CODE
class file. Users should set ClassFile.StackMapsOption.DROP_STACK_MAPS to prevent stack map generation from running and provide their own StackMapTableAttribute to a CodeBuilder.public static ClassFile.DeadCodeOption[] values()
public static ClassFile.DeadCodeOption valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/ClassFile.DeadCodeOption.html