- All Superinterfaces:
ClassFileBuilder<CodeElement,,CodeBuilder> CodeBuilder,Consumer<CodeElement>
- Enclosing interface:
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 inherited from interface io.smallrye.classfile.CodeBuilder
CodeBuilder.BlockCodeBuilder, CodeBuilder.CatchBuilder -
Method Summary
Modifier and TypeMethodDescriptionReturns the label locating where control is passed back to the parent block.Methods inherited from interface io.smallrye.classfile.ClassFileBuilder
accept, constantPool, transform, withMethods inherited from interface io.smallrye.classfile.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
-
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
-