Interface CodeLocalsShifter
- All Superinterfaces:
ClassFileTransformPREVIEW<CodeTransformPREVIEW,,CodeElementPREVIEW, CodeBuilderPREVIEW> CodeTransformPREVIEW
CodeLocalsShifter is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
CodeLocalsShifterPREVIEW is a CodeTransformPREVIEW shifting locals to
newly allocated positions to avoid conflicts during code injection.
Locals pointing to the receiver or to method arguments slots are never shifted.
All locals pointing beyond the method arguments are re-indexed in order of appearance.- Since:
- 22
-
Field Summary
Fields declared in interface java.lang.classfile.CodeTransformPREVIEW
ACCEPT_ALL -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic CodeLocalsShifterPREVIEWof(AccessFlagsPREVIEW methodFlags, MethodTypeDesc methodDescriptor) Creates a new instance ofCodeLocalsShifterPREVIEW with fixed local slots calculated from provided method information.Methods declared in interface java.lang.classfile.ClassFileTransformPREVIEW
accept, atEnd, atStartMethods declared in interface java.lang.classfile.CodeTransformPREVIEW
andThen
-
Method Details
-
of
Creates a new instance ofCodeLocalsShifterPREVIEW with fixed local slots calculated from provided method information.- Parameters:
methodFlags- flags of the method to constructCodeLocalsShifterPREVIEW formethodDescriptor- descriptor of the method to constructCodeLocalsShifterPREVIEW for- Returns:
- new instance of
CodeLocalsShifterPREVIEW
-
CodeLocalsShifterwhen preview features are enabled.