Declaration

Common interface for AST nodes that are main contents of a Kotlin file or a class body.

Inheritors

Types

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
data class FunctionDeclaration(val modifiers: List<Node.Modifier>, val lAngle: Node.Keyword.Less?, val typeParameters: List<Node.TypeParameter>, val rAngle: Node.Keyword.Greater?, val receiverType: Node.Type?, val name: Node.Expression.NameExpression?, val lPar: Node.Keyword.LPar, val parameters: List<Node.FunctionParameter>, val rPar: Node.Keyword.RPar, val returnType: Node.Type?, val postModifiers: List<Node.PostModifier>, val body: Node.Expression?, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration, Node.WithModifiers, Node.WithTypeParameters, Node.WithFunctionParameters, Node.WithPostModifiers

AST node that represents a function declaration. The node corresponds to KtNamedFunction.

Link copied to clipboard

AST node that represents an object declaration. The node corresponds to KtObjectDeclaration.

Link copied to clipboard
data class PropertyDeclaration(val modifiers: List<Node.Modifier>, val valOrVarKeyword: Node.Keyword.ValOrVarKeyword, val lAngle: Node.Keyword.Less?, val typeParameters: List<Node.TypeParameter>, val rAngle: Node.Keyword.Greater?, val receiverType: Node.Type?, val lPar: Node.Keyword.LPar?, val variables: List<Node.Variable>, val rPar: Node.Keyword.RPar?, val typeConstraintSet: Node.PostModifier.TypeConstraintSet?, val initializerExpression: Node.Expression?, val delegateExpression: Node.Expression?, val accessors: List<Node.Declaration.PropertyDeclaration.Accessor>, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration, Node.WithModifiers, Node.WithTypeParameters

AST node that represents a property declaration. The node corresponds to KtProperty or KtDestructuringDeclaration.

Link copied to clipboard
data class TypeAliasDeclaration(val modifiers: List<Node.Modifier>, val name: Node.Expression.NameExpression, val lAngle: Node.Keyword.Less?, val typeParameters: List<Node.TypeParameter>, val rAngle: Node.Keyword.Greater?, val type: Node.Type, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration, Node.WithModifiers, Node.WithTypeParameters

AST node that represents a type alias declaration. The node corresponds to KtTypeAlias.

Properties

Link copied to clipboard

Supplemental data for the node.