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

public final Class BufferedMethodBuilder

extends Object
implements TerminalMethodBuilder
Class Inheritance
All Implemented Interfaces
jdk.internal.classfile.impl.TerminalMethodBuilder, jdk.internal.classfile.impl.MethodInfo, java.lang.classfile.MethodBuilder, java.lang.classfile.ClassFileBuilder, java.util.function.Consumer
Imports
java.lang.classfile.*, java.lang.classfile.constantpool.ConstantPoolBuilder, .Utf8Entry, java.lang.constant.MethodTypeDesc, java.lang.reflect.AccessFlag, java.util.ArrayList, .List, .Optional, java.util.function.Consumer

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Field Summary

Modifier and TypeField and Description
private final SplitConstantPool
private final ClassFileImpl
private final Utf8Entry
private final List<MethodElement>
private AccessFlags
private final Utf8Entry
private final MethodModel
private int[]

Constructor Summary

AccessConstructor and Description
public
BufferedMethodBuilder(SplitConstantPool constantPool, ClassFileImpl context, Utf8Entry nameInfo, Utf8Entry typeInfo, int flags, MethodModel original)

Method Summary

Modifier and TypeMethod and Description
public BufferedCodeBuilder
private AccessFlags
public ConstantPoolBuilder
constantPool()

Implements java.lang.classfile.ClassFileBuilder.constantPool.

Returns the constant pool builder associated with this builder.

public int
public Utf8Entry
public Utf8Entry
public MethodTypeDesc
public int
public BufferedMethodBuilder
run(Consumer<? super MethodBuilder> handler)

public MethodModel
public MethodBuilder
transformCode(CodeModel code, CodeTransform 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 element)

Implements java.lang.classfile.ClassFileBuilder.with.

Integrates the member element into the structure being built.

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

Implements java.lang.classfile.MethodBuilder.withCode.

Build the method body for this method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constantPoolback to summary
private final SplitConstantPool constantPool
contextback to summary
private final ClassFileImpl context
descback to summary
private final Utf8Entry desc
elementsback to summary
private final List<MethodElement> elements
flagsback to summary
private AccessFlags flags
nameback to summary
private final Utf8Entry name
originalback to summary
private final MethodModel original
parameterSlotsback to summary
private int[] parameterSlots

Constructor Detail

BufferedMethodBuilderback to summary
public BufferedMethodBuilder(SplitConstantPool constantPool, ClassFileImpl context, Utf8Entry nameInfo, Utf8Entry typeInfo, int flags, MethodModel original)

Method Detail

bufferedCodeBuilderback to summary
public BufferedCodeBuilder bufferedCodeBuilder(CodeModel original)

Implements jdk.internal.classfile.impl.TerminalMethodBuilder.bufferedCodeBuilder.

Annotations
@Override
checkFlagsback to summary
private AccessFlags checkFlags(AccessFlags updated)
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.

Annotations
@Override
methodFlagsback to summary
public int methodFlags()

Implements jdk.internal.classfile.impl.MethodInfo.methodFlags.

Annotations
@Override
methodNameback to summary
public Utf8Entry methodName()

Implements jdk.internal.classfile.impl.MethodInfo.methodName.

Annotations
@Override
methodTypeback to summary
public Utf8Entry methodType()

Implements jdk.internal.classfile.impl.MethodInfo.methodType.

Annotations
@Override
methodTypeSymbolback to summary
public MethodTypeDesc methodTypeSymbol()

Implements jdk.internal.classfile.impl.MethodInfo.methodTypeSymbol.

Annotations
@Override
parameterSlotback to summary
public int parameterSlot(int paramNo)

Implements jdk.internal.classfile.impl.MethodInfo.parameterSlot.

Annotations
@Override
runback to summary
public BufferedMethodBuilder run(Consumer<? super MethodBuilder> handler)
toModelback to summary
public MethodModel toModel()
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.

This method behaves as if:

withCode(cob -> cob.transform(code, transform));
withCode(cob -> cob.transform(code, transform));
Annotations
@Override
withback to summary
public MethodBuilder with(MethodElement 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
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.

Annotations
@Override
jdk.internal.classfile.impl back to summary

public final Class BufferedMethodBuilder.Model

extends AbstractUnboundModel<MethodElement>
implements MethodModel, MethodInfo
Class Inheritance
All Implemented Interfaces
jdk.internal.classfile.impl.MethodInfo, java.lang.classfile.MethodModel, java.lang.classfile.ClassElement, java.lang.classfile.ClassFileElement, java.lang.classfile.AttributedElement, java.lang.classfile.CompoundElement, java.lang.Iterable

Field Summary

Inherited from jdk.internal.classfile.impl.AbstractUnboundModel:
elements

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Optional<CodeModel>
code()

Implements java.lang.classfile.MethodModel.code.

Returns the body of this method, if there is one.

public AccessFlags
flags()

Implements java.lang.classfile.MethodModel.flags.

Returns the access flags.

public int
public Utf8Entry
public Utf8Entry
methodType()

Implements java.lang.classfile.MethodModel.methodType, jdk.internal.classfile.impl.MethodInfo.methodType.

Returns the method descriptor string of this method.

public MethodTypeDesc
methodTypeSymbol()

Overrides default java.lang.classfile.MethodModel.methodTypeSymbol.

Implements jdk.internal.classfile.impl.MethodInfo.methodTypeSymbol.

Returns the method type, as a symbolic descriptor.

public int
public Optional<ClassModel>
parent()

Implements java.lang.classfile.MethodModel.parent.

Returns the class model this method is a member of, if known.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from jdk.internal.classfile.impl.AbstractUnboundModel:
attributeselementListelementStreamforEach

Constructor Detail

Modelback to summary
public Model()

Method Detail

codeback to summary
public Optional<CodeModel> code()

Implements java.lang.classfile.MethodModel.code.

Doc from java.lang.classfile.MethodModel.code.

Returns the body of this method, if there is one.

Annotations
@Override
flagsback to summary
public AccessFlags flags()

Implements java.lang.classfile.MethodModel.flags.

Doc from java.lang.classfile.MethodModel.flags.

Returns the access flags.

Annotations
@Override
methodFlagsback to summary
public int methodFlags()

Implements jdk.internal.classfile.impl.MethodInfo.methodFlags.

Annotations
@Override
methodNameback to summary
public Utf8Entry methodName()

Implements java.lang.classfile.MethodModel.methodName, jdk.internal.classfile.impl.MethodInfo.methodName.

Doc from java.lang.classfile.MethodModel.methodName.

Returns the name of this method.

Annotations
@Override
methodTypeback to summary
public Utf8Entry methodType()

Implements java.lang.classfile.MethodModel.methodType, jdk.internal.classfile.impl.MethodInfo.methodType.

Doc from java.lang.classfile.MethodModel.methodType.

Returns the method descriptor string of this method.

Annotations
@Override
methodTypeSymbolback to summary
public MethodTypeDesc methodTypeSymbol()

Overrides default java.lang.classfile.MethodModel.methodTypeSymbol.

Implements jdk.internal.classfile.impl.MethodInfo.methodTypeSymbol.

Doc from java.lang.classfile.MethodModel.methodTypeSymbol.

Returns the method type, as a symbolic descriptor.

Annotations
@Override
parameterSlotback to summary
public int parameterSlot(int paramNo)

Implements jdk.internal.classfile.impl.MethodInfo.parameterSlot.

Annotations
@Override
parentback to summary
public Optional<ClassModel> parent()

Implements java.lang.classfile.MethodModel.parent.

Doc from java.lang.classfile.MethodModel.parent.

Returns the class model this method is a member of, if known.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
writeToback to summary
public void writeTo(DirectClassBuilder builder)

Overrides jdk.internal.classfile.impl.AbstractElement.writeTo.

Annotations
@Override