ShakePackage

interface ShakePackage(source)

Represents a package in the Shake language. A package is a namespace that organizes classes, methods, fields, and other packages.

Since

0.1.0

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The base project to which this package belongs.

Link copied to clipboard
abstract val classes: List<ShakeClass>

A list of classes contained within this package.

Link copied to clipboard
abstract val fields: List<ShakeField>

A list of fields declared in this package.

Link copied to clipboard
abstract val functions: List<ShakeMethod>

A list of functions defined in this package.

Link copied to clipboard
abstract val name: String

The name of the package.

Link copied to clipboard
abstract val parent: ShakePackage?

The parent package, if any.

Link copied to clipboard

The fully qualified name of this package.

Link copied to clipboard

The prefix used for qualifying names in this package.

Link copied to clipboard
abstract val scope: ShakeScope

The scope of this package.

Link copied to clipboard

A list of subpackages contained within this package.

Functions

Link copied to clipboard
open fun getClass(name: Array<String>): ShakeClass?

Retrieves a class by an array of names.

open fun getClass(name: String): ShakeClass?

Retrieves a class by its name.

open fun getClass(name: List<String>): ShakeClass?

Retrieves a class by a path of names.

Link copied to clipboard
open fun getField(name: Array<String>): ShakeField?

Retrieves a field by an array of names.

open fun getField(name: String): ShakeField?

Retrieves a field by its name.

open fun getField(name: List<String>): ShakeField?

Retrieves a field by a path of names.

Link copied to clipboard

Retrieves functions by an array of names.

Retrieves functions by their name.

Retrieves functions by a path of names.

Link copied to clipboard
open fun getPackage(name: Array<String>): ShakePackage?
open fun getPackage(name: List<String>): ShakePackage?

Retrieves a subpackage by a path of names.

open fun getPackage(name: String): ShakePackage?

Retrieves a subpackage by name.

Link copied to clipboard
abstract fun phase1()

Executes the first phase of the package processing.

Link copied to clipboard
abstract fun phase2()

Executes the second phase of the package processing.

Link copied to clipboard
abstract fun phase3()

Executes the third phase of the package processing.

Link copied to clipboard
abstract fun phase4()

Executes the fourth phase of the package processing.

Link copied to clipboard
open fun toJson(): Map<String, Any?>

Converts this package to a JSON representation. Useful for serialization or debugging purposes.