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

ClassCollection

Wrapper for a Map with keys being strings and entries being ClassInfo objects.

Static Method Summary

Static Public Methods
public static

Static constructor for a new, empty ClassCollection.

public static

Static constructor for creating a new ClassCollection instance from a Map.

Constructor Summary

Private Constructor
private

Member Summary

Public Members
public get

Exposes the raw Map object.

Private Members
private

Method Summary

Public Methods
public

[Symbol.iterator](): Iterable

public

Retrieves a ClassInfo object from the collection by name.

public

has(name: string): Boolean

Checks to see if the collection contains an entry for the specified name.

public

set(name: string, cls: ClassInfo): *

Sets the corresponding entry in the collection for the specified name.

Static Public Methods

public static empty(): ClassCollection source

Static constructor for a new, empty ClassCollection.

Return:

ClassCollection

public static of(classes: Map<string, ClassInfo>): ClassCollection source

Static constructor for creating a new ClassCollection instance from a Map.

Params:

NameTypeAttributeDescription
classes Map<string, ClassInfo>

Return:

ClassCollection

Private Constructors

private constructor(map: Map<string, ClassInfo>) source

Params:

NameTypeAttributeDescription
map Map<string, ClassInfo>

Public Members

public get classes: Map<string, ClassInfo>: * source

Exposes the raw Map object.

Return:

Map<string, ClassInfo>

Private Members

private _classes: Map<string, ClassInfo> source

Public Methods

public [Symbol.iterator](): Iterable source

Return:

Iterable

public get(name: string): ClassInfo | undefined source

Retrieves a ClassInfo object from the collection by name.

Params:

NameTypeAttributeDescription
name string

Return:

ClassInfo | undefined

public has(name: string): Boolean source

Checks to see if the collection contains an entry for the specified name.

Params:

NameTypeAttributeDescription
name string

Return:

Boolean

public set(name: string, cls: ClassInfo): * source

Sets the corresponding entry in the collection for the specified name.

Params:

NameTypeAttributeDescription
name string
cls ClassInfo

Return:

*