CreationShakePackage

open class CreationShakePackage(val baseProject: CreationShakeProject, val name: String, val parent: CreationShakePackage? = null, val subpackages: MutableList<CreationShakePackage> = mutableListOf(), val classes: MutableList<CreationShakeClass> = mutableListOf(), val functions: MutableList<CreationShakeMethod> = mutableListOf(), val fields: MutableList<CreationShakeField> = mutableListOf()) : ShakePackage(source)

Constructors

Link copied to clipboard
constructor(baseProject: CreationShakeProject, name: String, parent: CreationShakePackage? = null, subpackages: MutableList<CreationShakePackage> = mutableListOf(), classes: MutableList<CreationShakeClass> = mutableListOf(), functions: MutableList<CreationShakeMethod> = mutableListOf(), fields: MutableList<CreationShakeField> = mutableListOf())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The base project to which this package belongs.

Link copied to clipboard

A list of classes contained within this package.

Link copied to clipboard

A list of fields declared in this package.

Link copied to clipboard

A list of functions defined in this package.

Link copied to clipboard
open override val name: String

The name of the package.

Link copied to clipboard
open override val parent: CreationShakePackage? = null

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
open override val scope: CreationShakeScope

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 override fun getPackage(name: Array<String>): CreationShakePackage?
open override fun getPackage(name: List<String>): CreationShakePackage?

Retrieves a subpackage by a path of names.

open override fun getPackage(name: String): CreationShakePackage?

Retrieves a subpackage by name.

Link copied to clipboard
open override fun phase1()

Phase 1: Register all classes See in the Specification

Link copied to clipboard
open override fun phase2()

Phase 2: Link Superclasses and Interfaces See in the Specification

Link copied to clipboard
open override fun phase3()

Phase 3: Process all methods and fields (without code) See in the Specification

Link copied to clipboard
open override fun phase4()

Phase 4: Process all code See in the Specification

Link copied to clipboard
open fun putFile(name: Array<String>, contents: ShakeFileNode)
open fun putFile(name: String, contents: ShakeFileNode)
Link copied to clipboard
open fun toJson(): Map<String, Any?>

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