ShakeProject

interface ShakeProject(source)

Represents a project in the Shake language. A project is a high-level structure that contains subpackages and provides methods to access various components like classes, methods, and fields.

Since

0.1.0

Inheritors

Properties

Link copied to clipboard
abstract val projectScope: ShakeScope

The scope of the project.

Link copied to clipboard

A list of subpackages contained within this project.

Functions

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

Retrieves a class by an array of names.

open fun getClass(clz: String): ShakeClass?

Retrieves a class by its full 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 full 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 full 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 project processing.

Link copied to clipboard
abstract fun phase2()

Executes the second phase of project processing.

Link copied to clipboard
abstract fun phase3()

Executes the third phase of project processing.

Link copied to clipboard
abstract fun phase4()

Executes the fourth phase of project processing.

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

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

Link copied to clipboard
open fun toJsonString(format: Boolean = false): String

Converts this project to a JSON string representation.