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

public final Class MethodImpl

extends AbstractElement
implements MethodModel, MethodInfo, Writable
Class Inheritance
All Implemented Interfaces
jdk.internal.classfile.impl.Util.Writable, 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
Imports
java.lang.classfile.*, java.lang.classfile.constantpool.Utf8Entry, java.lang.constant.MethodTypeDesc, java.lang.reflect.AccessFlag, java.util.List, .Optional, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
private List<Attribute<?>>
private final int
private final int
private int[]
private final ClassReader
private final int

Constructor Summary

AccessConstructor and Description
public
MethodImpl(ClassReader reader, int startPos, int endPos, int attrStart)

Method Summary

Modifier and TypeMethod and Description
public List<Attribute<?>>
attributes()

Implements java.lang.classfile.AttributedElement.attributes.

Returns the attributes of this structure.

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 void
forEach(Consumer<? super MethodElement> consumer)

Implements java.lang.classfile.CompoundElement.forEach.

Invokes the provided handler with each member element in this compound element.

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
public void
Inherited from jdk.internal.classfile.impl.AbstractElement:
writeTowriteTowriteTo

Field Detail

attributesback to summary
private List<Attribute<?>> attributes
attributesPosback to summary
private final int attributesPos
endPosback to summary
private final int endPos
parameterSlotsback to summary
private int[] parameterSlots
readerback to summary
private final ClassReader reader
startPosback to summary
private final int startPos

Constructor Detail

MethodImplback to summary
public MethodImpl(ClassReader reader, int startPos, int endPos, int attrStart)

Method Detail

attributesback to summary
public List<Attribute<?>> attributes()

Implements java.lang.classfile.AttributedElement.attributes.

Doc from java.lang.classfile.AttributedElement.attributes.

Returns the attributes of this structure.

Annotations
@Override
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
forEachback to summary
public void forEach(Consumer<? super MethodElement> consumer)

Implements java.lang.classfile.CompoundElement.forEach.

Doc from java.lang.classfile.CompoundElement.forEach.

Invokes the provided handler with each member element in this compound element.

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(BufWriterImpl buf)

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

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

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

Annotations
@Override