Home Reference Source
import {MethodInfo} from 'jvm/lib/core/jvm/MethodInfo.js'
public class | source

MethodInfo

Extends:

MemberInfo → MethodInfo

Wrapper for JVM Class File method entry.

Constructor Summary

Public Constructor
public

constructor(classInfo: ClassInfo, accessFlags: Number, name: string, descriptor: string)

Member Summary

Public Members
public get

Access the class this member is within

public get

desc: string: *

JVM type descriptor

public get
public get

Checks if the method should not have a method body by seeing if the Synthetic or Abstract access flags are set.

public get

instructions: Array<AbstractInstruction>: *[]

Getter for the collection of instructions belonging to a method.

public get

Parses the method descriptor's parameters.

public get

Parses the return type from the method's descriptor.

Private Members
private
private

Method Summary

Public Methods
public

Serialized version of this class without circular references.

Inherited Summary

From class MemberInfo
public get

Access flags bit string

public get

Collection of {@link AttributeInfo>} objects belonging to this entry.

public get

name: string: *

The name of this entry in the JVM Class File.

private
private

_flags: *

private

_name: *

public

Adds the specified attribute to this entry's collection of attributes.

public

Finds the first attribute for a given name.

public

Finds all attributes that exactly match the specified name.

public

Checks to see if an access flag bit has been set.

public

Serialized version of this class without circular references.

Public Constructors

public constructor(classInfo: ClassInfo, accessFlags: Number, name: string, descriptor: string) source

Override:

MemberInfo#constructor

Params:

NameTypeAttributeDescription
classInfo ClassInfo

The class the given method is in

accessFlags Number

access flags bit string

name string

name of this entry in the ClassFile

descriptor string

type descriptor

Public Members

public get classInfo: ClassInfo: * source

Access the class this member is within

Return:

ClassInfo

public get desc: string: * source

JVM type descriptor

Return:

string

public get hasMethodBody: Boolean: * source

Inverse of MethodInfo.hasNoMethodBody.

Return:

Boolean

public get hasNoMethodBody: Boolean: * source

Checks if the method should not have a method body by seeing if the Synthetic or Abstract access flags are set.

Return:

Boolean

public get instructions: Array<AbstractInstruction>: *[] source

Getter for the collection of instructions belonging to a method.

Return:

Array<AbstractInstruction>

public get parameters: Array<string>: * source

Parses the method descriptor's parameters.

Return:

Array<string>

public get returnType: string: * source

Parses the return type from the method's descriptor.

Return:

string

Private Members

private _classInfo: ClassInfo source

private _descriptor: string source

Public Methods

public toObject(): Object source

Serialized version of this class without circular references.

Override:

MemberInfo#toObject

Return:

Object