ClassDeclaration

AST node that represents a class or interface declaration. The node corresponds to KtClass.

Types

Link copied to clipboard

Common interface for class or interface keywords.

Link copied to clipboard
data class PrimaryConstructor(val modifiers: List<Node.Modifier>, val constructorKeyword: Node.Keyword.Constructor?, val lPar: Node.Keyword.LPar, val parameters: List<Node.FunctionParameter>, val rPar: Node.Keyword.RPar, val supplement: NodeSupplement = NodeSupplement()) : Node, Node.WithModifiers, Node.WithFunctionParameters

AST node that represents a primary constructor. The node corresponds to KtPrimaryConstructor.

Properties

Link copied to clipboard

list of annotation sets.

Link copied to clipboard

class body if exists, otherwise null.

Link copied to clipboard
Link copied to clipboard
open val isClass: Boolean

Returns true if the node is a class, false otherwise.

Link copied to clipboard

Returns true if the node has a companion modifier, false otherwise.

Link copied to clipboard
open val isEnum: Boolean

Returns true if the node has an enum modifier, false otherwise.

Link copied to clipboard

Returns true if the node is an interface, false otherwise.

Link copied to clipboard
open val isObject: Boolean

Returns true if the node is an object, false otherwise.

Link copied to clipboard
open override val lAngle: Node.Keyword.Less?

left angle bracket of the type parameters.

Link copied to clipboard
open override val modifiers: List<Node.Modifier>

list of modifiers.

Link copied to clipboard

name of the class.

Link copied to clipboard

list of class parents.

Link copied to clipboard

primary constructor if exists, otherwise null.

Link copied to clipboard
open override val rAngle: Node.Keyword.Greater?

right angle bracket of the type parameters.

Link copied to clipboard
open override val supplement: NodeSupplement

Supplemental data for the node.

Link copied to clipboard

type constraint set if exists, otherwise null.

Link copied to clipboard

list of type parameters.