APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.classfile.impl

public final Class ChainedCodeBuilder

extends NonterminalCodeBuilder
implements CodeBuilder
Class Inheritance
All Implemented Interfaces
java.lang.classfile.CodeBuilder, java.lang.classfile.ClassFileBuilder, java.util.function.Consumer
Imports
java.lang.classfile.CodeBuilder, .CodeElement, .Label, .TypeKind, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
private final Consumer<CodeElement>
Inherited from jdk.internal.classfile.impl.NonterminalCodeBuilder:
parentterminal

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
allocateLocal(TypeKind typeKind)

Implements java.lang.classfile.CodeBuilder.allocateLocal.

Returns the local variable slot of a fresh local variable.

public Label
endLabel()

Implements java.lang.classfile.CodeBuilder.endLabel.

Returns the label associated with the end of the current block.

public Label
startLabel()

Implements java.lang.classfile.CodeBuilder.startLabel.

Returns the label associated with the beginning of the current block.

public CodeBuilder
with(CodeElement element)

Implements java.lang.classfile.ClassFileBuilder.with.

Integrates the member element into the structure being built.

Inherited from jdk.internal.classfile.impl.NonterminalCodeBuilder:
constantPoolfindTerminalnewLabelparameterSlotreceiverSlot

Field Detail

consumerback to summary
private final Consumer<CodeElement> consumer

Constructor Detail

ChainedCodeBuilderback to summary
public ChainedCodeBuilder(CodeBuilder downstream, Consumer<CodeElement> consumer)

Method Detail

allocateLocalback to summary
public int allocateLocal(TypeKind typeKind)

Implements java.lang.classfile.CodeBuilder.allocateLocal.

Doc from java.lang.classfile.CodeBuilder.allocateLocal.

Returns the local variable slot of a fresh local variable. This method makes reasonable efforts to determine which slots are in use and which are not. When transforming a method, fresh locals begin at the maxLocals of the original method. For a method being built directly, fresh locals begin after the last parameter slot.

If the current code builder is a BlockCodeBuilder, at the end of the block, locals are reset to their value at the beginning of the block.

Annotations
@Override
endLabelback to summary
public Label endLabel()

Implements java.lang.classfile.CodeBuilder.endLabel.

Doc from java.lang.classfile.CodeBuilder.endLabel.

Returns the label associated with the end of the current block. If this builder is not a "block" builder, such as those provided by block(Consumer) or ifThenElse(Consumer, Consumer), the current block will be the entire method body.

Annotations
@Override
startLabelback to summary
public Label startLabel()

Implements java.lang.classfile.CodeBuilder.startLabel.

Doc from java.lang.classfile.CodeBuilder.startLabel.

Returns the label associated with the beginning of the current block. If this builder is not a "block" builder, such as those provided by block(Consumer) or ifThenElse(Consumer, Consumer), the current block will be the entire method body.

Annotations
@Override
withback to summary
public CodeBuilder with(CodeElement element)

Implements java.lang.classfile.ClassFileBuilder.with.

Doc from java.lang.classfile.ClassFileBuilder.with.

Integrates the member element into the structure being built.

Annotations
@Override