java.lang.Object
org.glavo.classfile.impl.NonterminalCodeBuilder
- All Implemented Interfaces:
Consumer<CodeElement>,ClassFileBuilder<CodeElement,,CodeBuilder> CodeBuilder
- Direct Known Subclasses:
BlockCodeBuilderImpl,ChainedCodeBuilder
public abstract sealed class NonterminalCodeBuilder
extends Object
implements CodeBuilder
permits ChainedCodeBuilder, BlockCodeBuilderImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glavo.classfile.CodeBuilder
CodeBuilder.BlockCodeBuilder, CodeBuilder.CatchBuilder -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the constant pool builder associated with this builder.newLabel()Returns a fresh unbound label.original()intparameterSlot(int paramNo) Returns the local variable slot associated with the specified parameter.intReturns the local variable slot associated with the receiver.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glavo.classfile.ClassFileBuilder
accept, canWriteDirect, transform, withMethods inherited from interface org.glavo.classfile.CodeBuilder
aaload, aastore, aconst_null, allocateLocal, aload, anewarray, anewarray, areturn, arraylength, arrayLoadInstruction, arrayStoreInstruction, astore, athrow, baload, bastore, bipush, block, branchInstruction, caload, castore, characterRange, checkcast, checkcast, constantInstruction, constantInstruction, convertInstruction, 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, fieldInstruction, fieldInstruction, 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, if_nonnull, if_null, ifeq, ifge, ifgt, ifle, iflt, ifne, ifThen, ifThen, ifThenElse, ifThenElse, iinc, iload, imul, incrementInstruction, ineg, instanceof_, instanceof_, invokedynamic, invokedynamic, invokeDynamicInstruction, invokeDynamicInstruction, invokeInstruction, invokeInstruction, 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, loadInstruction, localVariable, localVariable, localVariableType, localVariableType, lookupswitch, lookupSwitchInstruction, lor, lrem, lreturn, lshl, lshr, lstore, lsub, lushr, lxor, monitorenter, monitorexit, monitorInstruction, multianewarray, multianewarray, new_, new_, newarray, newBoundLabel, newMultidimensionalArrayInstruction, newMultidimensionalArrayInstruction, newObjectInstruction, newObjectInstruction, newPrimitiveArrayInstruction, newReferenceArrayInstruction, newReferenceArrayInstruction, nop, nopInstruction, operatorInstruction, pop, pop2, putfield, putfield, putstatic, putstatic, return_, returnInstruction, saload, sastore, sipush, stackInstruction, startLabel, storeInstruction, swap, tableswitch, tableswitch, tableSwitchInstruction, throwInstruction, transforming, trying, typeCheckInstruction, typeCheckInstruction
-
Field Details
-
terminal
-
parent
-
-
Constructor Details
-
NonterminalCodeBuilder
-
-
Method Details
-
receiverSlot
public int receiverSlot()Description copied from interface:CodeBuilderReturns the local variable slot associated with the receiver..- Specified by:
receiverSlotin interfaceCodeBuilder- Returns:
- the local variable slot associated with the receiver
-
parameterSlot
public int parameterSlot(int paramNo) Description copied from interface:CodeBuilderReturns the local variable slot associated with the specified parameter.. The returned value is adjusted for the receiver slot (if the method is an instance method) and for the requirement thatlonganddoublevalues require two slots.- Specified by:
parameterSlotin interfaceCodeBuilder- Parameters:
paramNo- the index of the parameter- Returns:
- the local variable slot associated with the specified parameter
-
constantPool
Description copied from interface:ClassFileBuilderReturns the constant pool builder associated with this builder.- Specified by:
constantPoolin interfaceClassFileBuilder<CodeElement,CodeBuilder> - Returns:
- the constant pool builder associated with this builder
-
original
Description copied from interface:CodeBuilderReturns theCodeModelrepresenting the method body being transformed, if this code builder represents the transformation of someCodeModel.- Specified by:
originalin interfaceCodeBuilder- Returns:
- the
CodeModelrepresenting the method body being transformed, if this code builder represents the transformation of someCodeModel
-
newLabel
Description copied from interface:CodeBuilderReturns a fresh unbound label.- Specified by:
newLabelin interfaceCodeBuilder- Returns:
- a fresh unbound label
-