PackageRef

abstract class PackageRef(name: String, parent: Namespace?) : Namespace

A package reference. Should be the superclass of an object inside another Namespace. The parent will be auto-filled (at compile time), as will the name if not set. The parent will be the enclosing object, which must be a Namespace. By default, the name is the lower case object name.

For an example, see com.rnett.plugin.stdlib.Kotlin.Collections.

Constructors

PackageRef
Link copied to clipboard
fun PackageRef(name: String)
PackageRef
Link copied to clipboard
fun PackageRef()

Create a PackageRef with auto-filled name and parent. Name will be the lower cased name of the object or class that extends this.

PackageRef
Link copied to clipboard
fun PackageRef(name: String, parent: Namespace?)

Functions

toString
Link copied to clipboard
open override fun toString(): String

Properties

fqName
Link copied to clipboard
val fqName: FqName

Inheritors

Reflect
Link copied to clipboard
Collections
Link copied to clipboard

Extensions

constructor
Link copied to clipboard
fun PackageRef.constructor(className: String, filter: ConstructorFilter.() -> Unit = {}): ConstructorRef

Get a constructor for the class with className in this PackageRef, matching filter.

primaryConstructor
Link copied to clipboard
fun PackageRef.primaryConstructor(className: String, filter: ConstructorFilter.() -> Unit = {}): ConstructorRef

Get the primary constructor for the class with className in this PackageRef, matching filter.

Sources

jvm source
Link copied to clipboard