Uses of Interface
java.lang.classfile.CodeBuilder
Package
Description
Provides classfile parsing, generation, and transformation library.
Provides specific components, transformations, and tools built on top of the
java.lang.classfile
PREVIEW library.-
Uses of CodeBuilderPREVIEW in java.lang.classfilePREVIEW
Modifier and TypeInterfaceDescriptionstatic interface
Preview.A builder for blocks of code.Modifier and TypeInterfaceDescriptioninterface
Preview.A builder for code attributes (method bodies).interface
Preview.A transformation on streams ofCodeElement
PREVIEW.Modifier and TypeMethodDescriptiondefault CodeBuilderPREVIEW
CodeBuilder.aaload()
Generate an instruction to load a reference from an arraydefault CodeBuilderPREVIEW
CodeBuilder.aastore()
Generate an instruction to store into a reference arraydefault CodeBuilderPREVIEW
CodeBuilder.aconst_null()
Generate an instruction pushing the null object reference onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.aload
(int slot) Generate an instruction to load a reference from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.anewarray
(ClassEntryPREVIEW classEntry) Generate an instruction to create a new array of referencedefault CodeBuilderPREVIEW
Generate an instruction to create a new array of referencedefault CodeBuilderPREVIEW
CodeBuilder.areturn()
Generate an instruction to return a reference from the methoddefault CodeBuilderPREVIEW
CodeBuilder.arraylength()
Generate an instruction to get length of an arraydefault CodeBuilderPREVIEW
Generate an instruction to load from an arraydefault CodeBuilderPREVIEW
CodeBuilder.arrayStore
(TypeKindPREVIEW tk) Generate an instruction to store into an arraydefault CodeBuilderPREVIEW
CodeBuilder.astore
(int slot) Generate an instruction to store a reference into a local variabledefault CodeBuilderPREVIEW
CodeBuilder.athrow()
Generate an instruction to throw an exception or errordefault CodeBuilderPREVIEW
CodeBuilder.baload()
Generate an instruction to load a byte from a arraydefault CodeBuilderPREVIEW
CodeBuilder.bastore()
Generate an instruction to store into a byte arraydefault CodeBuilderPREVIEW
CodeBuilder.bipush
(int b) Generate an instruction pushing an int in the range of byte onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.block
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> handler) Add a lexical block to the method being built.default CodeBuilderPREVIEW
Generate a branch instructiondefault CodeBuilderPREVIEW
CodeBuilder.caload()
Generate an instruction to load a char from an arraydefault CodeBuilderPREVIEW
CodeBuilder.castore()
Generate an instruction to store into a char arraydefault CodeBuilderPREVIEW
CodeBuilder.characterRange
(LabelPREVIEW startScope, LabelPREVIEW endScope, int characterRangeStart, int characterRangeEnd, int flags) Declare a character range entrydefault CodeBuilderPREVIEW
CodeBuilder.checkcast
(ClassEntryPREVIEW type) Generate an instruction to check whether an object is of the given typedefault CodeBuilderPREVIEW
Generate an instruction to check whether an object is of the given typedefault CodeBuilderPREVIEW
CodeBuilder.conversion
(TypeKindPREVIEW fromType, TypeKindPREVIEW toType) Generate instruction(s) to convertfromType
totoType
default CodeBuilderPREVIEW
CodeBuilder.d2f()
Generate an instruction to convert a double into a floatdefault CodeBuilderPREVIEW
CodeBuilder.d2i()
Generate an instruction to convert a double into an intdefault CodeBuilderPREVIEW
CodeBuilder.d2l()
Generate an instruction to convert a double into a longdefault CodeBuilderPREVIEW
CodeBuilder.dadd()
Generate an instruction to add a doubledefault CodeBuilderPREVIEW
CodeBuilder.daload()
Generate an instruction to load a double from an arraydefault CodeBuilderPREVIEW
CodeBuilder.dastore()
Generate an instruction to store into a double arraydefault CodeBuilderPREVIEW
CodeBuilder.dcmpg()
Generate an instruction to add a doubledefault CodeBuilderPREVIEW
CodeBuilder.dcmpl()
Generate an instruction to compare doublesdefault CodeBuilderPREVIEW
CodeBuilder.dconst_0()
Generate an instruction pushing double constant 0 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.dconst_1()
Generate an instruction pushing double constant 1 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.ddiv()
Generate an instruction to divide doublesdefault CodeBuilderPREVIEW
CodeBuilder.dload
(int slot) Generate an instruction to load a double from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.dmul()
Generate an instruction to multiply doublesdefault CodeBuilderPREVIEW
CodeBuilder.dneg()
Generate an instruction to negate a doubledefault CodeBuilderPREVIEW
CodeBuilder.drem()
Generate an instruction to calculate double remainderdefault CodeBuilderPREVIEW
CodeBuilder.dreturn()
Generate an instruction to return a double from the methoddefault CodeBuilderPREVIEW
CodeBuilder.dstore
(int slot) Generate an instruction to store a double into a local variabledefault CodeBuilderPREVIEW
CodeBuilder.dsub()
Generate an instruction to subtract doublesdefault CodeBuilderPREVIEW
CodeBuilder.dup()
Generate an instruction to duplicate the top operand stack valuedefault CodeBuilderPREVIEW
CodeBuilder.dup_x1()
Generate an instruction to duplicate the top operand stack value and insert two values downdefault CodeBuilderPREVIEW
CodeBuilder.dup_x2()
Generate an instruction to duplicate the top operand stack value and insert two or three values downdefault CodeBuilderPREVIEW
CodeBuilder.dup2()
Generate an instruction to duplicate the top one or two operand stack valuedefault CodeBuilderPREVIEW
CodeBuilder.dup2_x1()
Generate an instruction to duplicate the top one or two operand stack values and insert two or three values downdefault CodeBuilderPREVIEW
CodeBuilder.dup2_x2()
Generate an instruction to duplicate the top one or two operand stack values and insert two, three, or four values downdefault CodeBuilderPREVIEW
CodeBuilder.exceptionCatch
(LabelPREVIEW start, LabelPREVIEW end, LabelPREVIEW handler, ClassEntryPREVIEW catchType) Declare an exception table entrydefault CodeBuilderPREVIEW
CodeBuilder.exceptionCatch
(LabelPREVIEW start, LabelPREVIEW end, LabelPREVIEW handler, ClassDesc catchType) Declare an exception table entrydefault CodeBuilderPREVIEW
CodeBuilder.exceptionCatch
(LabelPREVIEW start, LabelPREVIEW end, LabelPREVIEW handler, Optional<ClassEntryPREVIEW> catchType) Declare an exception table entrydefault CodeBuilderPREVIEW
Declare an exception table entry catching all exceptions and errorsdefault CodeBuilderPREVIEW
CodeBuilder.f2d()
Generate an instruction to convert a float into a doubledefault CodeBuilderPREVIEW
CodeBuilder.f2i()
Generate an instruction to convert a float into an intdefault CodeBuilderPREVIEW
CodeBuilder.f2l()
Generate an instruction to convert a float into a longdefault CodeBuilderPREVIEW
CodeBuilder.fadd()
Generate an instruction to add a floatdefault CodeBuilderPREVIEW
CodeBuilder.faload()
Generate an instruction to load a float from an arraydefault CodeBuilderPREVIEW
CodeBuilder.fastore()
Generate an instruction to store into a float arraydefault CodeBuilderPREVIEW
CodeBuilder.fcmpg()
Generate an instruction to compare floatsdefault CodeBuilderPREVIEW
CodeBuilder.fcmpl()
Generate an instruction to compare floatsdefault CodeBuilderPREVIEW
CodeBuilder.fconst_0()
Generate an instruction pushing float constant 0 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.fconst_1()
Generate an instruction pushing float constant 1 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.fconst_2()
Generate an instruction pushing float constant 2 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.fdiv()
Generate an instruction to divide floatsdefault CodeBuilderPREVIEW
CodeBuilder.fieldAccess
(OpcodePREVIEW opcode, FieldRefEntryPREVIEW ref) Generate an instruction to access a fielddefault CodeBuilderPREVIEW
Generate an instruction to access a fielddefault CodeBuilderPREVIEW
CodeBuilder.fload
(int slot) Generate an instruction to load a float from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.fmul()
Generate an instruction to multiply floatsdefault CodeBuilderPREVIEW
CodeBuilder.fneg()
Generate an instruction to negate a floatdefault CodeBuilderPREVIEW
CodeBuilder.frem()
Generate an instruction to calculate floats remainderdefault CodeBuilderPREVIEW
CodeBuilder.freturn()
Generate an instruction to return a float from the methoddefault CodeBuilderPREVIEW
CodeBuilder.fstore
(int slot) Generate an instruction to store a float into a local variabledefault CodeBuilderPREVIEW
CodeBuilder.fsub()
Generate an instruction to subtract floatsdefault CodeBuilderPREVIEW
CodeBuilder.getfield
(FieldRefEntryPREVIEW ref) Generate an instruction to fetch field from an objectdefault CodeBuilderPREVIEW
Generate an instruction to fetch field from an objectdefault CodeBuilderPREVIEW
CodeBuilder.getstatic
(FieldRefEntryPREVIEW ref) Generate an instruction to get static field from a classdefault CodeBuilderPREVIEW
Generate an instruction to get static field from a classdefault CodeBuilderPREVIEW
Generate an instruction to branch alwaysdefault CodeBuilderPREVIEW
Generate an instruction to branch always with wide indexdefault CodeBuilderPREVIEW
CodeBuilder.i2b()
Generate an instruction to convert an int into a bytedefault CodeBuilderPREVIEW
CodeBuilder.i2c()
Generate an instruction to convert an int into a chardefault CodeBuilderPREVIEW
CodeBuilder.i2d()
Generate an instruction to convert an int into a doubledefault CodeBuilderPREVIEW
CodeBuilder.i2f()
Generate an instruction to convert an int into a floatdefault CodeBuilderPREVIEW
CodeBuilder.i2l()
Generate an instruction to convert an int into a longdefault CodeBuilderPREVIEW
CodeBuilder.i2s()
Generate an instruction to convert an int into a shortdefault CodeBuilderPREVIEW
CodeBuilder.iadd()
Generate an instruction to add an intdefault CodeBuilderPREVIEW
CodeBuilder.iaload()
Generate an instruction to load a int from an arraydefault CodeBuilderPREVIEW
CodeBuilder.iand()
Generate an instruction to calculate boolean AND of intsdefault CodeBuilderPREVIEW
CodeBuilder.iastore()
Generate an instruction to store into an int arraydefault CodeBuilderPREVIEW
CodeBuilder.iconst_0()
Generate an instruction pushing int constant 0 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_1()
Generate an instruction pushing int constant 1 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_2()
Generate an instruction pushing int constant 2 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_3()
Generate an instruction pushing int constant 3 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_4()
Generate an instruction pushing int constant 4 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_5()
Generate an instruction pushing int constant 5 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.iconst_m1()
Generate an instruction pushing int constant -1 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.idiv()
Generate an instruction to divide intsdefault CodeBuilderPREVIEW
Generate an instruction to branch if reference comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if reference comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilderPREVIEW
Generate an instruction to branch if reference is not nulldefault CodeBuilderPREVIEW
Generate an instruction to branch if reference is nulldefault CodeBuilderPREVIEW
Add an "if-then" block that is conditional on the value(s) on top of the operand stack in accordance with the given opcode.default CodeBuilderPREVIEW
CodeBuilder.ifThen
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler) Add an "if-then" block that is conditional on the boolean value on top of the operand stack.default CodeBuilderPREVIEW
CodeBuilder.ifThenElse
(OpcodePREVIEW opcode, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler) Add an "if-then-else" block that is conditional on the value(s) on top of the operand stack in accordance with the given opcode.default CodeBuilderPREVIEW
CodeBuilder.ifThenElse
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler) Add an "if-then-else" block that is conditional on the boolean value on top of the operand stack.default CodeBuilderPREVIEW
CodeBuilder.iinc
(int slot, int val) Generate an instruction to increment a local variable by a constantdefault CodeBuilderPREVIEW
CodeBuilder.iload
(int slot) Generate an instruction to load an int from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.imul()
Generate an instruction to multiply intsdefault CodeBuilderPREVIEW
CodeBuilder.ineg()
Generate an instruction to negate an intdefault CodeBuilderPREVIEW
CodeBuilder.instanceOf
(ClassEntryPREVIEW target) Generate an instruction to determine if an object is of the given typedefault CodeBuilderPREVIEW
CodeBuilder.instanceOf
(ClassDesc target) Generate an instruction to determine if an object is of the given typedefault CodeBuilderPREVIEW
CodeBuilder.invoke
(OpcodePREVIEW opcode, MemberRefEntryPREVIEW ref) Generate an instruction to invoke a method or constructordefault CodeBuilderPREVIEW
CodeBuilder.invoke
(OpcodePREVIEW opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) Generate an instruction to invoke a method or constructordefault CodeBuilderPREVIEW
CodeBuilder.invokedynamic
(InvokeDynamicEntryPREVIEW ref) Generate an instruction to invoke a dynamically-computed call sitedefault CodeBuilderPREVIEW
CodeBuilder.invokedynamic
(DynamicCallSiteDesc ref) Generate an instruction to invoke a dynamically-computed call sitedefault CodeBuilderPREVIEW
CodeBuilder.invokeinterface
(InterfaceMethodRefEntryPREVIEW ref) Generate an instruction to invoke an interface methoddefault CodeBuilderPREVIEW
CodeBuilder.invokeinterface
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an interface methoddefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(InterfaceMethodRefEntryPREVIEW ref) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(MethodRefEntryPREVIEW ref) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokespecial
(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(InterfaceMethodRefEntryPREVIEW ref) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(MethodRefEntryPREVIEW ref) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokestatic
(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEW
CodeBuilder.invokevirtual
(MethodRefEntryPREVIEW ref) Generate an instruction to invoke an instance method; dispatch based on classdefault CodeBuilderPREVIEW
CodeBuilder.invokevirtual
(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; dispatch based on classdefault CodeBuilderPREVIEW
CodeBuilder.ior()
Generate an instruction to calculate boolean OR of intsdefault CodeBuilderPREVIEW
CodeBuilder.irem()
Generate an instruction to calculate ints remainderdefault CodeBuilderPREVIEW
CodeBuilder.ireturn()
Generate an instruction to return an int from the methoddefault CodeBuilderPREVIEW
CodeBuilder.ishl()
Generate an instruction to shift an int leftdefault CodeBuilderPREVIEW
CodeBuilder.ishr()
Generate an instruction to shift an int rightdefault CodeBuilderPREVIEW
CodeBuilder.istore
(int slot) Generate an instruction to store an int into a local variabledefault CodeBuilderPREVIEW
CodeBuilder.isub()
Generate an instruction to subtract intsdefault CodeBuilderPREVIEW
CodeBuilder.iushr()
Generate an instruction to logical shift an int rightdefault CodeBuilderPREVIEW
CodeBuilder.ixor()
Generate an instruction to calculate boolean XOR of intsdefault CodeBuilderPREVIEW
CodeBuilder.l2d()
Generate an instruction to convert a long into a doubledefault CodeBuilderPREVIEW
CodeBuilder.l2f()
Generate an instruction to convert a long into a floatdefault CodeBuilderPREVIEW
CodeBuilder.l2i()
Generate an instruction to convert a long into an intdefault CodeBuilderPREVIEW
CodeBuilder.labelBinding
(LabelPREVIEW label) Bind label with current positiondefault CodeBuilderPREVIEW
CodeBuilder.ladd()
Generate an instruction to add a longdefault CodeBuilderPREVIEW
CodeBuilder.laload()
Generate an instruction to load a long from an arraydefault CodeBuilderPREVIEW
CodeBuilder.land()
Generate an instruction to calculate boolean AND of longsdefault CodeBuilderPREVIEW
CodeBuilder.lastore()
Generate an instruction to store into a long arraydefault CodeBuilderPREVIEW
CodeBuilder.lcmp()
Generate an instruction to compare longsdefault CodeBuilderPREVIEW
CodeBuilder.lconst_0()
Generate an instruction pushing long constant 0 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.lconst_1()
Generate an instruction pushing long constant 1 onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.ldc
(LoadableConstantEntryPREVIEW entry) Generate an instruction pushing an item from the run-time constant pool onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.ldc
(ConstantDesc value) Generate an instruction pushing an item from the run-time constant pool onto the operand stackdefault CodeBuilderPREVIEW
CodeBuilder.ldiv()
Generate an instruction to divide longsdefault CodeBuilderPREVIEW
CodeBuilder.lineNumber
(int line) Declare a source line number of the current builder positiondefault CodeBuilderPREVIEW
CodeBuilder.lload
(int slot) Generate an instruction to load a long from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.lmul()
Generate an instruction to multiply longsdefault CodeBuilderPREVIEW
CodeBuilder.lneg()
Generate an instruction to negate a longdefault CodeBuilderPREVIEW
CodeBuilder.loadConstant
(double value) Generate an instruction pushing a constant double value onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.loadConstant
(float value) Generate an instruction pushing a constant float value onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.loadConstant
(int value) Generate an instruction pushing a constant int value onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.loadConstant
(long value) Generate an instruction pushing a constant long value onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.loadConstant
(ConstantDesc value) Generate an instruction pushing a constant onto the operand stackdefault CodeBuilderPREVIEW
Generate an instruction to load a value from a local variabledefault CodeBuilderPREVIEW
CodeBuilder.localVariable
(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW descriptorEntry, LabelPREVIEW startScope, LabelPREVIEW endScope) Declare a local variable entrydefault CodeBuilderPREVIEW
CodeBuilder.localVariable
(int slot, String name, ClassDesc descriptor, LabelPREVIEW startScope, LabelPREVIEW endScope) Declare a local variable entrydefault CodeBuilderPREVIEW
CodeBuilder.localVariableType
(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW signatureEntry, LabelPREVIEW startScope, LabelPREVIEW endScope) Declare a local variable type entrydefault CodeBuilderPREVIEW
CodeBuilder.localVariableType
(int slot, String name, SignaturePREVIEW signature, LabelPREVIEW startScope, LabelPREVIEW endScope) Declare a local variable type entrydefault CodeBuilderPREVIEW
CodeBuilder.lookupswitch
(LabelPREVIEW defaultTarget, List<SwitchCasePREVIEW> cases) Generate an instruction to access a jump table by key match and jumpdefault CodeBuilderPREVIEW
CodeBuilder.lor()
Generate an instruction to calculate boolean OR of longsdefault CodeBuilderPREVIEW
CodeBuilder.lrem()
Generate an instruction to calculate longs remainderdefault CodeBuilderPREVIEW
CodeBuilder.lreturn()
Generate an instruction to return a long from the methoddefault CodeBuilderPREVIEW
CodeBuilder.lshl()
Generate an instruction to shift a long leftdefault CodeBuilderPREVIEW
CodeBuilder.lshr()
Generate an instruction to shift a long rightdefault CodeBuilderPREVIEW
CodeBuilder.lstore
(int slot) Generate an instruction to store a long into a local variabledefault CodeBuilderPREVIEW
CodeBuilder.lsub()
Generate an instruction to subtract longsdefault CodeBuilderPREVIEW
CodeBuilder.lushr()
Generate an instruction to logical shift a long leftdefault CodeBuilderPREVIEW
CodeBuilder.lxor()
Generate an instruction to calculate boolean XOR of longsdefault CodeBuilderPREVIEW
CodeBuilder.monitorenter()
Generate an instruction to enter monitor for an objectdefault CodeBuilderPREVIEW
CodeBuilder.monitorexit()
Generate an instruction to exit monitor for an objectdefault CodeBuilderPREVIEW
CodeBuilder.multianewarray
(ClassEntryPREVIEW array, int dims) Generate an instruction to create a new multidimensional arraydefault CodeBuilderPREVIEW
CodeBuilder.multianewarray
(ClassDesc array, int dims) Generate an instruction to create a new multidimensional arraydefault CodeBuilderPREVIEW
CodeBuilder.new_
(ClassEntryPREVIEW clazz) Generate an instruction to create a new objectdefault CodeBuilderPREVIEW
Generate an instruction to create a new objectdefault CodeBuilderPREVIEW
Generate an instruction to create a new array of a primitive typedefault CodeBuilderPREVIEW
CodeBuilder.nop()
Generate a do nothing instructiondefault CodeBuilderPREVIEW
CodeBuilder.pop()
Generate an instruction to pop the top operand stack valuedefault CodeBuilderPREVIEW
CodeBuilder.pop2()
Generate an instruction to pop the top one or two operand stack valuesdefault CodeBuilderPREVIEW
CodeBuilder.putfield
(FieldRefEntryPREVIEW ref) Generate an instruction to set field in an objectdefault CodeBuilderPREVIEW
Generate an instruction to set field in an objectdefault CodeBuilderPREVIEW
CodeBuilder.putstatic
(FieldRefEntryPREVIEW ref) Generate an instruction to set static field in a classdefault CodeBuilderPREVIEW
Generate an instruction to set static field in a classdefault CodeBuilderPREVIEW
CodeBuilder.return_()
Generate an instruction to return void from the methoddefault CodeBuilderPREVIEW
Generate return instructiondefault CodeBuilderPREVIEW
CodeBuilder.saload()
Generate an instruction to load a short from an arraydefault CodeBuilderPREVIEW
CodeBuilder.sastore()
Generate an instruction to store into a short arraydefault CodeBuilderPREVIEW
CodeBuilder.sipush
(int s) Generate an instruction pushing an int in the range of short onto the operand stack.default CodeBuilderPREVIEW
CodeBuilder.storeLocal
(TypeKindPREVIEW tk, int slot) Generate an instruction to store a value to a local variabledefault CodeBuilderPREVIEW
CodeBuilder.swap()
Generate an instruction to swap the top two operand stack valuesdefault CodeBuilderPREVIEW
CodeBuilder.tableswitch
(int low, int high, LabelPREVIEW defaultTarget, List<SwitchCasePREVIEW> cases) Generate an instruction to access a jump table by index and jumpdefault CodeBuilderPREVIEW
CodeBuilder.tableswitch
(LabelPREVIEW defaultTarget, List<SwitchCasePREVIEW> cases) Generate an instruction to access a jump table by index and jumpdefault CodeBuilderPREVIEW
CodeBuilder.transforming
(CodeTransformPREVIEW transform, Consumer<CodeBuilderPREVIEW> handler) Apply a transform to the code built by a handler, directing results to this builder.default CodeBuilderPREVIEW
CodeBuilder.trying
(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> tryHandler, Consumer<CodeBuilder.CatchBuilderPREVIEW> catchesHandler) Adds a "try-catch" block comprising one try block and zero or more catch blocks.Modifier and TypeMethodDescriptionstatic CodeTransformPREVIEW
CodeTransform.endHandler
(Consumer<CodeBuilderPREVIEW> finisher) Create a code transform that passes each element through to the builder, and calls the specified function when transformation is complete.default CodeBuilderPREVIEW
CodeBuilder.transforming
(CodeTransformPREVIEW transform, Consumer<CodeBuilderPREVIEW> handler) Apply a transform to the code built by a handler, directing results to this builder.MethodBuilder.withCode
(Consumer<? super CodeBuilderPREVIEW> code) Build the method body for this method.default ClassBuilderPREVIEW
ClassBuilder.withMethodBody
(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, int methodFlags, Consumer<? super CodeBuilderPREVIEW> handler) Adds a method, with only aCode
attribute.default ClassBuilderPREVIEW
ClassBuilder.withMethodBody
(String name, MethodTypeDesc descriptor, int methodFlags, Consumer<? super CodeBuilderPREVIEW> handler) Adds a method, with only aCodeAttribute
PREVIEW. -
Uses of CodeBuilderPREVIEW in java.lang.classfile.componentsPREVIEW
Modifier and TypeMethodDescriptionstatic CodeRelabelerPREVIEW
CodeRelabeler.of
(BiFunction<LabelPREVIEW, CodeBuilderPREVIEW, LabelPREVIEW> mapFunction) Creates a new instance of CodeRelabeler using providedBiFunction
to re-label the code.