Top Fields Constructors Methods
jdk.internal.classfile.impl

public final Class ChainedMethodBuilder

extends Object
implements MethodBuilder
Class Inheritance
All Implemented Interfaces
java.lang.classfile.MethodBuilder, java.lang.classfile.ClassFileBuilder, java.util.function.Consumer
Imports
java.util.Optional, java.util.function.Consumer, java.lang.classfile.CodeBuilder, .CodeModel, .CodeTransform, .MethodBuilder, .MethodElement, .MethodModel, java.lang.classfile.constantpool.ConstantPoolBuilder

Field Summary

Modifier and TypeField and Description
pack-priv final Consumer<MethodElement>
pack-priv final TerminalMethodBuilder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ConstantPoolBuilder
constantPool()

Implements java.lang.classfile.ClassFileBuilder.constantPool.

Returns the constant pool builder associated with this builder.

public Optional<MethodModel>
original()

Implements java.lang.classfile.MethodBuilder.original.

Returns the MethodModel representing the method being transformed, if this method builder represents the transformation of some MethodModel.

public MethodBuilder
transformCode(CodeModel
the method body to be transformed
code
,
CodeTransform
the transform to apply to the method body
transform
)

Implements java.lang.classfile.MethodBuilder.transformCode.

Build the method body for this method by transforming the body of another method.

public MethodBuilder
with(MethodElement
the element
element
)

Implements java.lang.classfile.ClassFileBuilder.with.

Integrate the ClassFileElement into the entity being built.

public MethodBuilder
withCode(Consumer<? super CodeBuilder>
a handler receiving a CodeBuilder
handler
)

Implements java.lang.classfile.MethodBuilder.withCode.

Build the method body for this method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

consumerback to summary
pack-priv final Consumer<MethodElement> consumer
terminalback to summary
pack-priv final TerminalMethodBuilder terminal

Constructor Detail

ChainedMethodBuilderback to summary
public ChainedMethodBuilder(MethodBuilder downstream, Consumer<MethodElement> consumer)

Method Detail

constantPoolback to summary
public ConstantPoolBuilder constantPool()

Implements java.lang.classfile.ClassFileBuilder.constantPool.

Doc from java.lang.classfile.ClassFileBuilder.constantPool.

Returns the constant pool builder associated with this builder.

Returns:ConstantPoolBuilder

the constant pool builder associated with this builder

Annotations
@Override
originalback to summary
public Optional<MethodModel> original()

Implements java.lang.classfile.MethodBuilder.original.

Doc from java.lang.classfile.MethodBuilder.original.

Returns the MethodModel representing the method being transformed, if this method builder represents the transformation of some MethodModel.

Returns:Optional<MethodModel>

the MethodModel representing the method being transformed, if this method builder represents the transformation of some MethodModel

Annotations
@Override
transformCodeback to summary
public MethodBuilder transformCode(CodeModel code, CodeTransform transform)

Implements java.lang.classfile.MethodBuilder.transformCode.

Doc from java.lang.classfile.MethodBuilder.transformCode.

Build the method body for this method by transforming the body of another method.

Parameters
code:CodeModel

the method body to be transformed

transform:CodeTransform

the transform to apply to the method body

Returns:MethodBuilder

this builder

Annotations
@Override
withback to summary
public MethodBuilder with(MethodElement element)

Implements java.lang.classfile.ClassFileBuilder.with.

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

Integrate the ClassFileElement into the entity being built.

Parameters
element:MethodElement

the element

Returns:MethodBuilder

this builder

Annotations
@Override
withCodeback to summary
public MethodBuilder withCode(Consumer<? super CodeBuilder> handler)

Implements java.lang.classfile.MethodBuilder.withCode.

Doc from java.lang.classfile.MethodBuilder.withCode.

Build the method body for this method.

Parameters
handler:Consumer<? super CodeBuilder>

a handler receiving a CodeBuilder

Returns:MethodBuilder

this builder

Annotations
@Override