Spec-Zone.ru › OpenJDK 27

Interface CodeBuilder.BlockCodeBuilder

All Superinterfaces:
ClassFileBuilder<CodeElement, CodeBuilder>, CodeBuilder, Consumer<CodeElement>
Enclosing interface:
CodeBuilder
public static sealed interface CodeBuilder.BlockCodeBuilder extends CodeBuilder
A builder for blocks of code. Its CodeBuilder.startLabel() and CodeBuilder.endLabel() do not enclose the entire method body, but from the start to the end of the block.

The location where a block of code merges back to its parent block, as represented by the breakLabel(), is expected to be reachable, either from this block or the parent block. The built code may be malformed if there is no executable code at that location.

Since:
24

Nested Class Summary

Nested classes/interfaces declared in interface CodeBuilder

CodeBuilder.BlockCodeBuilder, CodeBuilder.CatchBuilder
Modifier and Type Interface Description
static interface  CodeBuilder.BlockCodeBuilder
A builder for blocks of code.
static interface  CodeBuilder.CatchBuilder
A builder to add catch blocks.

Method Summary

Modifier and Type Method Description
Label breakLabel()
Returns the label locating where control is passed back to the parent block.

Methods declared in interface ClassFileBuilder

accept, constantPool, transform, with
Modifier and Type Method Description
default void accept(CodeElement e)
Integrates the member element into the structure being built.
ConstantPoolBuilder constantPool()
Returns the constant pool builder associated with this builder.
default CodeBuilder transform(CompoundElement<CodeElement> model, ClassFileTransform<?, CodeElement, CodeBuilder> transform)
Applies a transform to a compound structure, directing results to this builder.
CodeBuilder with(CodeElement e)
Integrates the member element into the structure being built.

Methods declared in interface CodeBuilder

aaload, aastore, aconst_null, allocateLocal, aload, anewarray, anewarray, areturn, arraylength, arrayLoad, arrayStore, astore, athrow, baload, bastore, bipush, block, branch, caload, castore, characterRange, checkcast, checkcast, conversion, d2f, d2i, d2l, dadd, daload, dastore, dcmpg, dcmpl, dconst_0, dconst_1, ddiv, dload, dmul, dneg, drem, dreturn, dstore, dsub, dup, dup_x1, dup_x2, dup2, dup2_x1, dup2_x2, endLabel, exceptionCatch, exceptionCatch, exceptionCatch, exceptionCatchAll, f2d, f2i, f2l, fadd, faload, fastore, fcmpg, fcmpl, fconst_0, fconst_1, fconst_2, fdiv, fieldAccess, fieldAccess, fload, fmul, fneg, frem, freturn, fstore, fsub, getfield, getfield, getstatic, getstatic, goto_, goto_w, i2b, i2c, i2d, i2f, i2l, i2s, iadd, iaload, iand, iastore, iconst_0, iconst_1, iconst_2, iconst_3, iconst_4, iconst_5, iconst_m1, idiv, if_acmpeq, if_acmpne, if_icmpeq, if_icmpge, if_icmpgt, if_icmple, if_icmplt, if_icmpne, ifeq, ifge, ifgt, ifle, iflt, ifne, ifnonnull, ifnull, ifThen, ifThen, ifThenElse, ifThenElse, iinc, iload, imul, ineg, instanceOf, instanceOf, invoke, invoke, invokedynamic, invokedynamic, invokeinterface, invokeinterface, invokespecial, invokespecial, invokespecial, invokespecial, invokestatic, invokestatic, invokestatic, invokestatic, invokevirtual, invokevirtual, ior, irem, ireturn, ishl, ishr, istore, isub, iushr, ixor, l2d, l2f, l2i, labelBinding, ladd, laload, land, lastore, lcmp, lconst_0, lconst_1, ldc, ldc, ldiv, lineNumber, lload, lmul, lneg, loadConstant, loadConstant, loadConstant, loadConstant, loadConstant, loadLocal, localVariable, localVariable, localVariableType, localVariableType, lookupswitch, lor, lrem, lreturn, lshl, lshr, lstore, lsub, lushr, lxor, monitorenter, monitorexit, multianewarray, multianewarray, new_, new_, newarray, newBoundLabel, newLabel, nop, parameterSlot, pop, pop2, putfield, putfield, putstatic, putstatic, receiverSlot, return_, return_, saload, sastore, sipush, startLabel, storeLocal, swap, tableswitch, tableswitch, transforming, trying
Modifier and Type Method Description
default CodeBuilder aaload()
Generates an instruction to load from a reference array.
default CodeBuilder aastore()
Generates an instruction to store into a reference array.
default CodeBuilder aconst_null()
Generates an instruction pushing the null object reference onto the operand stack.
int allocateLocal(TypeKind typeKind)
Returns the local variable slot of a fresh local variable.
default CodeBuilder aload(int slot)
Generates an instruction to load a reference from a local variable.
default CodeBuilder anewarray(ClassEntry classEntry)
Generates an instruction to create a new array of reference.
default CodeBuilder anewarray(ClassDesc className)
Generates an instruction to create a new array of reference.
default CodeBuilder areturn()
Generates an instruction to return a reference from this method.
default CodeBuilder arraylength()
Generates an instruction to get the length of an array.
default CodeBuilder arrayLoad(TypeKind tk)
Generates an instruction to load from an array.
default CodeBuilder arrayStore(TypeKind tk)
Generates an instruction to store into an array.
default CodeBuilder astore(int slot)
Generates an instruction to store a reference into a local variable.
default CodeBuilder athrow()
Generates an instruction to throw an exception or error.
default CodeBuilder baload()
Generates an instruction to load from a byte or boolean array.
default CodeBuilder bastore()
Generates an instruction to store into a byte or boolean array.
default CodeBuilder bipush(int b)
Generates an instruction pushing an int in the range of byte ([-128, 127]) onto the operand stack.
default CodeBuilder block(Consumer<CodeBuilder.BlockCodeBuilder> handler)
Adds a lexical block to the method being built.
default CodeBuilder branch(Opcode op, Label target)
Generates a branch instruction.
default CodeBuilder caload()
Generates an instruction to load from a char array.
default CodeBuilder castore()
Generates an instruction to store into a char array.
default CodeBuilder characterRange(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags)
Declares a character range entry.
default CodeBuilder checkcast(ClassEntry type)
Generates an instruction to check whether an object is of the given type, throwing a ClassCastException if the check fails.
default CodeBuilder checkcast(ClassDesc type)
Generates an instruction to check whether an object is of the given type, throwing a ClassCastException if the check fails.
default CodeBuilder conversion(TypeKind fromType, TypeKind toType)
Generates instruction(s) to convert fromType to toType.
default CodeBuilder d2f()
Generates an instruction to convert a double into a float.
default CodeBuilder d2i()
Generates an instruction to convert a double into an int.
default CodeBuilder d2l()
Generates an instruction to convert a double into a long.
default CodeBuilder dadd()
Generates an instruction to add two doubles.
default CodeBuilder daload()
Generates an instruction to load from a double array.
default CodeBuilder dastore()
Generates an instruction to store into a double array.
default CodeBuilder dcmpg()
Generates an instruction to compare two doubles, producing 1 if any operand is NaN.
default CodeBuilder dcmpl()
Generates an instruction to compare two doubles, producing -1 if any operand is NaN.
default CodeBuilder dconst_0()
Generates an instruction pushing double constant 0 onto the operand stack.
default CodeBuilder dconst_1()
Generates an instruction pushing double constant 1 onto the operand stack.
default CodeBuilder ddiv()
Generates an instruction to divide doubles.
default CodeBuilder dload(int slot)
Generates an instruction to load a double from a local variable.
default CodeBuilder dmul()
Generates an instruction to multiply doubles.
default CodeBuilder dneg()
Generates an instruction to negate a double.
default CodeBuilder drem()
Generates an instruction to calculate double remainder.
default CodeBuilder dreturn()
Generates an instruction to return a double from this method.
default CodeBuilder dstore(int slot)
Generates an instruction to store a double into a local variable.
default CodeBuilder dsub()
Generates an instruction to subtract doubles.
default CodeBuilder dup()
Generates an instruction to duplicate the top operand stack value.
default CodeBuilder dup_x1()
Generates an instruction to duplicate the top operand stack value and insert two values down.
default CodeBuilder dup_x2()
Generates an instruction to duplicate the top operand stack value and insert two or three values down.
default CodeBuilder dup2()
Generates an instruction to duplicate the top one or two operand stack value.
default CodeBuilder dup2_x1()
Generates an instruction to duplicate the top one or two operand stack values and insert two or three values down.
default CodeBuilder dup2_x2()
Generates an instruction to duplicate the top one or two operand stack values and insert two, three, or four values down.
Label endLabel()
Returns the label associated with the end of the current block.
default CodeBuilder exceptionCatch(Label start, Label end, Label handler, ClassEntry catchType)
Declares an exception table entry.
default CodeBuilder exceptionCatch(Label start, Label end, Label handler, ClassDesc catchType)
Declares an exception table entry.
default CodeBuilder exceptionCatch(Label start, Label end, Label handler, Optional<ClassEntry> catchType)
Declares an exception table entry.
default CodeBuilder exceptionCatchAll(Label start, Label end, Label handler)
Declares an exception table entry catching all exceptions and errors.
default CodeBuilder f2d()
Generates an instruction to convert a float into a double.
default CodeBuilder f2i()
Generates an instruction to convert a float into an int.
default CodeBuilder f2l()
Generates an instruction to convert a float into a long.
default CodeBuilder fadd()
Generates an instruction to add two floats.
default CodeBuilder faload()
Generates an instruction to load from a float array.
default CodeBuilder fastore()
Generates an instruction to store into a float array.
default CodeBuilder fcmpg()
Generates an instruction to compare floats, producing 1 if any operand is NaN.
default CodeBuilder fcmpl()
Generates an instruction to compare floats, producing -1 if any operand is NaN.
default CodeBuilder fconst_0()
Generates an instruction pushing float constant 0 onto the operand stack.
default CodeBuilder fconst_1()
Generates an instruction pushing float constant 1 onto the operand stack.
default CodeBuilder fconst_2()
Generates an instruction pushing float constant 2 onto the operand stack.
default CodeBuilder fdiv()
Generates an instruction to divide floats.
default CodeBuilder fieldAccess(Opcode opcode, FieldRefEntry ref)
Generates an instruction to access a field.
default CodeBuilder fieldAccess(Opcode opcode, ClassDesc owner, String name, ClassDesc type)
Generates an instruction to access a field.
default CodeBuilder fload(int slot)
Generates an instruction to load a float from a local variable.
default CodeBuilder fmul()
Generates an instruction to multiply floats.
default CodeBuilder fneg()
Generates an instruction to negate a float.
default CodeBuilder frem()
Generates an instruction to calculate floats remainder.
default CodeBuilder freturn()
Generates an instruction to return a float from this method.
default CodeBuilder fstore(int slot)
Generates an instruction to store a float into a local variable.
default CodeBuilder fsub()
Generates an instruction to subtract floats.
default CodeBuilder getfield(FieldRefEntry ref)
Generates an instruction to fetch field from an object.
default CodeBuilder getfield(ClassDesc owner, String name, ClassDesc type)
Generates an instruction to fetch field from an object.
default CodeBuilder getstatic(FieldRefEntry ref)
Generates an instruction to get static field from a class or interface.
default CodeBuilder getstatic(ClassDesc owner, String name, ClassDesc type)
Generates an instruction to get static field from a class or interface.
default CodeBuilder goto_(Label target)
Generates an instruction to branch always.
default CodeBuilder goto_w(Label target)
Generates an instruction to branch always with wide index.
default CodeBuilder i2b()
Generates an instruction to truncate an int into the range of byte and sign-extend it.
default CodeBuilder i2c()
Generates an instruction to truncate an int into the range of char and zero-extend it.
default CodeBuilder i2d()
Generates an instruction to convert an int into a double.
default CodeBuilder i2f()
Generates an instruction to convert an int into a float.
default CodeBuilder i2l()
Generates an instruction to convert an int into a long.
default CodeBuilder i2s()
Generates an instruction to truncate an int into the range of short and sign-extend it.
default CodeBuilder iadd()
Generates an instruction to add two ints.
default CodeBuilder iaload()
Generates an instruction to load from an int array.
default CodeBuilder iand()
Generates an instruction to calculate bitwise AND of ints, also used for boolean AND.
default CodeBuilder iastore()
Generates an instruction to store into an int array.
default CodeBuilder iconst_0()
Generates an instruction pushing int constant 0 onto the operand stack.
default CodeBuilder iconst_1()
Generates an instruction pushing int constant 1 onto the operand stack.
default CodeBuilder iconst_2()
Generates an instruction pushing int constant 2 onto the operand stack.
default CodeBuilder iconst_3()
Generates an instruction pushing int constant 3 onto the operand stack.
default CodeBuilder iconst_4()
Generates an instruction pushing int constant 4 onto the operand stack.
default CodeBuilder iconst_5()
Generates an instruction pushing int constant 5 onto the operand stack.
default CodeBuilder iconst_m1()
Generates an instruction pushing int constant -1 onto the operand stack.
default CodeBuilder idiv()
Generates an instruction to divide ints.
default CodeBuilder if_acmpeq(Label target)
Generates an instruction to branch if reference comparison operand1 == operand2 succeeds.
default CodeBuilder if_acmpne(Label target)
Generates an instruction to branch if reference comparison operand1 != operand2 succeeds.
default CodeBuilder if_icmpeq(Label target)
Generates an instruction to branch if int comparison operand1 == operand2 succeeds.
default CodeBuilder if_icmpge(Label target)
Generates an instruction to branch if int comparison operand1 >= operand2 succeeds.
default CodeBuilder if_icmpgt(Label target)
Generates an instruction to branch if int comparison operand1 > operand2 succeeds.
default CodeBuilder if_icmple(Label target)
Generates an instruction to branch if int comparison operand1 <= operand2 succeeds.
default CodeBuilder if_icmplt(Label target)
Generates an instruction to branch if int comparison operand1 < operand2 succeeds.
default CodeBuilder if_icmpne(Label target)
Generates an instruction to branch if int comparison operand1 != operand2 succeeds.
default CodeBuilder ifeq(Label target)
Generates an instruction to branch if int comparison with zero == 0 succeeds.
default CodeBuilder ifge(Label target)
Generates an instruction to branch if int comparison with zero >= 0 succeeds.
default CodeBuilder ifgt(Label target)
Generates an instruction to branch if int comparison with zero > 0 succeeds.
default CodeBuilder ifle(Label target)
Generates an instruction to branch if int comparison with zero <= 0 succeeds.
default CodeBuilder iflt(Label target)
Generates an instruction to branch if int comparison with zero < 0 succeeds.
default CodeBuilder ifne(Label target)
Generates an instruction to branch if int comparison with zero != 0 succeeds.
default CodeBuilder ifnonnull(Label target)
Generates an instruction to branch if reference is not null.
default CodeBuilder ifnull(Label target)
Generates an instruction to branch if reference is null.
default CodeBuilder ifThen(Opcode opcode, Consumer<CodeBuilder.BlockCodeBuilder> thenHandler)
Adds an "if-then" block that is conditional on the value(s) on top of the operand stack in accordance with the given opcode.
default CodeBuilder ifThen(Consumer<CodeBuilder.BlockCodeBuilder> thenHandler)
Adds an "if-then" block that is conditional on the boolean value on top of the operand stack.
default CodeBuilder ifThenElse(Opcode opcode, Consumer<CodeBuilder.BlockCodeBuilder> thenHandler, Consumer<CodeBuilder.BlockCodeBuilder> elseHandler)
Adds 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 CodeBuilder ifThenElse(Consumer<CodeBuilder.BlockCodeBuilder> thenHandler, Consumer<CodeBuilder.BlockCodeBuilder> elseHandler)
Adds an "if-then-else" block that is conditional on the boolean value on top of the operand stack.
default CodeBuilder iinc(int slot, int val)
Generates an instruction to increment an int local variable by a constant.
default CodeBuilder iload(int slot)
Generates an instruction to load an int from a local variable.
default CodeBuilder imul()
Generates an instruction to multiply ints.
default CodeBuilder ineg()
Generates an instruction to negate an int.
default CodeBuilder instanceOf(ClassEntry target)
Generates an instruction to determine if an object is of the given type, producing a boolean result on the operand stack.
default CodeBuilder instanceOf(ClassDesc target)
Generates an instruction to determine if an object is of the given type, producing a boolean result on the operand stack.
default CodeBuilder invoke(Opcode opcode, MemberRefEntry ref)
Generates an instruction to invoke a method.
default CodeBuilder invoke(Opcode opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface)
Generates an instruction to invoke a method.
default CodeBuilder invokedynamic(InvokeDynamicEntry ref)
Generates an instruction to invoke a dynamically-computed call site.
default CodeBuilder invokedynamic(DynamicCallSiteDesc ref)
Generates an instruction to invoke a dynamically-computed call site.
default CodeBuilder invokeinterface(InterfaceMethodRefEntry ref)
Generates an instruction to invoke an interface method.
default CodeBuilder invokeinterface(ClassDesc owner, String name, MethodTypeDesc type)
Generates an instruction to invoke an interface method.
default CodeBuilder invokespecial(InterfaceMethodRefEntry ref)
Generates an instruction to invoke an instance method in an interface; direct invocation of methods of the current class and its supertypes.
default CodeBuilder invokespecial(MethodRefEntry ref)
Generates an instruction to invoke an instance method in a class; direct invocation of instance initialization methods and methods of the current class and its supertypes.
default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc type)
Generates an instruction to invoke an instance method in a class; direct invocation of instance initialization methods and methods of the current class and its supertypes.
default CodeBuilder invokespecial(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface)
Generates an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.
default CodeBuilder invokestatic(InterfaceMethodRefEntry ref)
Generates an instruction to invoke a class (static) method of an interface.
default CodeBuilder invokestatic(MethodRefEntry ref)
Generates an instruction to invoke a class (static) method of a class.
default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc type)
Generates an instruction to invoke a class (static) method of a class.
default CodeBuilder invokestatic(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface)
Generates an instruction to invoke a class (static) method.
default CodeBuilder invokevirtual(MethodRefEntry ref)
Generates an instruction to invoke an instance method; dispatch based on class.
default CodeBuilder invokevirtual(ClassDesc owner, String name, MethodTypeDesc type)
Generates an instruction to invoke an instance method; dispatch based on class.
default CodeBuilder ior()
Generates an instruction to calculate bitwise OR of ints, also used for boolean OR.
default CodeBuilder irem()
Generates an instruction to calculate ints remainder.
default CodeBuilder ireturn()
Generates an instruction to return an int from this method.
default CodeBuilder ishl()
Generates an instruction to shift an int left.
default CodeBuilder ishr()
Generates an instruction to shift an int right.
default CodeBuilder istore(int slot)
Generates an instruction to store an int into a local variable.
default CodeBuilder isub()
Generates an instruction to subtract ints.
default CodeBuilder iushr()
Generates an instruction to logical shift an int right.
default CodeBuilder ixor()
Generates an instruction to calculate bitwise XOR of ints.
default CodeBuilder l2d()
Generates an instruction to convert a long into a double.
default CodeBuilder l2f()
Generates an instruction to convert a long into a float.
default CodeBuilder l2i()
Generates an instruction to convert a long into an int.
default CodeBuilder labelBinding(Label label)
Binds a label to the current position.
default CodeBuilder ladd()
Generates an instruction to add two longs.
default CodeBuilder laload()
Generates an instruction to load from a long array.
default CodeBuilder land()
Generates an instruction to calculate bitwise AND of longs.
default CodeBuilder lastore()
Generates an instruction to store into a long array.
default CodeBuilder lcmp()
Generates an instruction to compare longs.
default CodeBuilder lconst_0()
Generates an instruction pushing long constant 0 onto the operand stack.
default CodeBuilder lconst_1()
Generates an instruction pushing long constant 1 onto the operand stack.
default CodeBuilder ldc(LoadableConstantEntry entry)
Generates an instruction pushing an item from the run-time constant pool onto the operand stack.
default CodeBuilder ldc(ConstantDesc value)
Generates an instruction pushing an item from the run-time constant pool onto the operand stack.
default CodeBuilder ldiv()
Generates an instruction to divide longs.
default CodeBuilder lineNumber(int line)
Declares a source line number beginning at the current position.
default CodeBuilder lload(int slot)
Generates an instruction to load a long from a local variable.
default CodeBuilder lmul()
Generates an instruction to multiply longs.
default CodeBuilder lneg()
Generates an instruction to negate a long.
default CodeBuilder loadConstant(double value)
Generates an instruction pushing a constant double value onto the operand stack.
default CodeBuilder loadConstant(float value)
Generates an instruction pushing a constant float value onto the operand stack.
default CodeBuilder loadConstant(int value)
Generates an instruction pushing a constant int value onto the operand stack.
default CodeBuilder loadConstant(long value)
Generates an instruction pushing a constant long value onto the operand stack.
default CodeBuilder loadConstant(ConstantDesc value)
Generates an instruction pushing a constant onto the operand stack.
default CodeBuilder loadLocal(TypeKind tk, int slot)
Generates an instruction to load a value from a local variable.
default CodeBuilder localVariable(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope)
Declares a local variable entry.
default CodeBuilder localVariable(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope)
Declares a local variable entry.
default CodeBuilder localVariableType(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope)
Declares a local variable type entry.
default CodeBuilder localVariableType(int slot, String name, Signature signature, Label startScope, Label endScope)
Declares a local variable type entry.
default CodeBuilder lookupswitch(Label defaultTarget, List<SwitchCase> cases)
Generates an instruction to access a jump table by key match and jump.
default CodeBuilder lor()
Generates an instruction to calculate bitwise OR of longs.
default CodeBuilder lrem()
Generates an instruction to calculate longs remainder.
default CodeBuilder lreturn()
Generates an instruction to return a long from this method.
default CodeBuilder lshl()
Generates an instruction to shift a long left.
default CodeBuilder lshr()
Generates an instruction to shift a long right.
default CodeBuilder lstore(int slot)
Generates an instruction to store a long into a local variable.
default CodeBuilder lsub()
Generates an instruction to subtract longs.
default CodeBuilder lushr()
Generates an instruction to logical shift a long right.
default CodeBuilder lxor()
Generates an instruction to calculate bitwise XOR of longs.
default CodeBuilder monitorenter()
Generates an instruction to enter monitor for an object.
default CodeBuilder monitorexit()
Generates an instruction to exit monitor for an object.
default CodeBuilder multianewarray(ClassEntry array, int dims)
Generates an instruction to create a new multidimensional array.
default CodeBuilder multianewarray(ClassDesc array, int dims)
Generates an instruction to create a new multidimensional array.
default CodeBuilder new_(ClassEntry clazz)
Generates an instruction to create a new object.
default CodeBuilder new_(ClassDesc clazz)
Generates an instruction to create a new object.
default CodeBuilder newarray(TypeKind typeKind)
Generates an instruction to create a new array of a primitive type.
default Label newBoundLabel()
Creates a new label bound at the current position.
Label newLabel()
Returns a fresh unbound label.
default CodeBuilder nop()
Generates a do-nothing instruction.
int parameterSlot(int paramNo)
Returns the local variable slot associated with the specified parameter.
default CodeBuilder pop()
Generates an instruction to pop the top operand stack value.
default CodeBuilder pop2()
Generates an instruction to pop the top one or two operand stack values.
default CodeBuilder putfield(FieldRefEntry ref)
Generates an instruction to set field in an object.
default CodeBuilder putfield(ClassDesc owner, String name, ClassDesc type)
Generates an instruction to set field in an object.
default CodeBuilder putstatic(FieldRefEntry ref)
Generates an instruction to set static field in a class.
default CodeBuilder putstatic(ClassDesc owner, String name, ClassDesc type)
Generates an instruction to set static field in a class.
int receiverSlot()
Returns the local variable slot associated with the receiver.
default CodeBuilder return_()
Generates an instruction to return void from this method.
default CodeBuilder return_(TypeKind tk)
Generates a return instruction.
default CodeBuilder saload()
Generates an instruction to load from a short array.
default CodeBuilder sastore()
Generates an instruction to store into a short array.
default CodeBuilder sipush(int s)
Generates an instruction pushing an int in the range of short, [-32768, 32767], onto the operand stack.
Label startLabel()
Returns the label associated with the beginning of the current block.
default CodeBuilder storeLocal(TypeKind tk, int slot)
Generates an instruction to store a value to a local variable.
default CodeBuilder swap()
Generates an instruction to swap the top two operand stack values.
default CodeBuilder tableswitch(int low, int high, Label defaultTarget, List<SwitchCase> cases)
Generates an instruction to access a jump table by index and jump.
default CodeBuilder tableswitch(Label defaultTarget, List<SwitchCase> cases)
Generates an instruction to access a jump table by index and jump.
default CodeBuilder transforming(CodeTransform transform, Consumer<CodeBuilder> handler)
Apply a transform to the code built by a handler, directing results to this builder.
default CodeBuilder trying(Consumer<CodeBuilder.BlockCodeBuilder> tryHandler, Consumer<CodeBuilder.CatchBuilder> catchesHandler)
Adds a "try-catch" block comprising one try block and zero or more catch blocks.

Methods declared in interface Consumer

andThen
Modifier and Type Method Description
default Consumer<CodeElement> andThen(Consumer<? super CodeElement> after)
Returns a composed Consumer that performs, in sequence, this operation followed by the after operation.

Method Details

breakLabel

Label breakLabel()
Returns the label locating where control is passed back to the parent block. A branch to this label "break"'s out of the current block.

If the last instruction in this block does not lead to the break label, Class-File API may append instructions to target the "break" label to the built block.

Returns:
the label locating where control is passed back to the parent block

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API