- All Superinterfaces:
ClassfileTransform<CodeTransform,,CodeElement, CodeBuilder> CodeTransform
- All Known Implementing Classes:
CodeLocalsShifter.CodeLocalsShifterImpl
public sealed interface CodeLocalsShifter
extends CodeTransform
permits CodeLocalsShifter.CodeLocalsShifterImpl
CodeLocalsShifter is a CodeTransform 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.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.glavo.classfile.ClassfileTransform
ClassfileTransform.ResolvedTransform<E extends ClassfileElement> -
Field Summary
Fields inherited from interface org.glavo.classfile.CodeTransform
ACCEPT_ALL -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic CodeLocalsShifterof(AccessFlags methodFlags, MethodTypeDesc methodDescriptor) Creates a new instance ofCodeLocalsShifterwith fixed local slots calculated from provided method informationMethods inherited from interface org.glavo.classfile.ClassfileTransform
accept, atEnd, atStartMethods inherited from interface org.glavo.classfile.CodeTransform
andThen, resolve
-
Method Details
-
of
Creates a new instance ofCodeLocalsShifterwith fixed local slots calculated from provided method information- Parameters:
methodFlags- flags of the method to constructCodeLocalsShifterformethodDescriptor- descriptor of the method to constructCodeLocalsShifterfor- Returns:
- new instance of
CodeLocalsShifter
-