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

ClassLoader

Utility class for loading JVM Class Files into ClassInfo objects.

Method Summary

Public Methods
public

loadClass(name: string, buff: Buffer): Promise<ClassInfo>

Parses the class from the Buffer object.

public

Loads all classes from a Jar.

Public Methods

public loadClass(name: string, buff: Buffer): Promise<ClassInfo> source

Parses the class from the Buffer object.

Params:

NameTypeAttributeDescription
name string

the name of the Class File

buff Buffer

the byte Buffer object

Return:

Promise<ClassInfo>

public loadClasses(archive: Jar): Promise<ClassCollection> source

Loads all classes from a Jar.

Params:

NameTypeAttributeDescription
archive Jar