Module java.base

Interface CodeRelabeler

All Superinterfaces:
ClassFileTransformPREVIEW<CodeTransformPREVIEW,CodeElementPREVIEW,CodeBuilderPREVIEW>, CodeTransformPREVIEW

public sealed interface CodeRelabeler extends CodeTransformPREVIEW
CodeRelabeler is a preview API of the Java platform.
Programs can only use CodeRelabeler when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A code relabeler is a CodeTransformPREVIEW replacing all occurrences of LabelPREVIEW in the transformed code with new instances. All LabelTargetPREVIEW instructions are adjusted accordingly. Relabeled code graph is identical to the original.

Primary purpose of CodeRelabeler is for repeated injections of the same code blocks. Repeated injection of the same code block must be relabeled, so each instance of LabelPREVIEW is bound in the target bytecode exactly once.

Since:
22