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

public final Class DirectMethodBuilder

extends AbstractDirectBuilder<MethodModel>
implements TerminalMethodBuilder, Writable
Class Inheritance
All Implemented Interfaces
jdk.internal.classfile.impl.Util.Writable, 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.Utf8Entry, java.lang.constant.MethodTypeDesc, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
pack-priv final Utf8Entry
pack-priv int
pack-priv final Utf8Entry
pack-priv int[]
Inherited from jdk.internal.classfile.impl.AbstractDirectBuilder:
attributesconstantPoolcontextoriginal

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public BufferedCodeBuilder
public int
public Utf8Entry
public Utf8Entry
public MethodTypeDesc
public int
public DirectMethodBuilder
run(Consumer<? super MethodBuilder> handler)

pack-priv void
setFlags(int flags)

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.

private MethodBuilder
withCode(CodeModel original, Consumer<? super CodeBuilder> handler)

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

Implements java.lang.classfile.MethodBuilder.withCode.

Build the method body for this method.

public MethodBuilder
withFlags(int flags)

Overrides default java.lang.classfile.MethodBuilder.withFlags.

Sets the method access flags.

public void
Inherited from jdk.internal.classfile.impl.AbstractDirectBuilder:
canWriteDirectconstantPoolsetOriginalwriteAttribute

Field Detail

descback to summary
pack-priv final Utf8Entry desc
flagsback to summary
pack-priv int flags
nameback to summary
pack-priv final Utf8Entry name
parameterSlotsback to summary
pack-priv int[] parameterSlots

Constructor Detail

DirectMethodBuilderback to summary
public DirectMethodBuilder(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
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 DirectMethodBuilder run(Consumer<? super MethodBuilder> handler)
setFlagsback to summary
pack-priv void setFlags(int flags)
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
private MethodBuilder withCode(CodeModel original, Consumer<? super CodeBuilder> handler)
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
withFlagsback to summary
public MethodBuilder withFlags(int flags)

Overrides default java.lang.classfile.MethodBuilder.withFlags.

Doc from java.lang.classfile.MethodBuilder.withFlags.

Sets the method access flags. The AccessFlag#STATIC flag cannot be modified after the builder is created.

Annotations
@Override
writeToback to summary
public void writeTo(BufWriterImpl buf)

Implements jdk.internal.classfile.impl.Util.Writable.writeTo.

Annotations
@Override