FunctionDeclaration

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.

Constructors

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

Properties

Link copied to clipboard

list of annotation sets.

Link copied to clipboard

body of the function if exists, otherwise null.

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

left angle bracket of the type parameters if exists, otherwise null.

Link copied to clipboard
open override val lPar: Node.Keyword.LPar

left parenthesis of the function parameters.

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

list of modifiers.

Link copied to clipboard

name of the function. If the function is anonymous, the name is null.

Link copied to clipboard

list of parameters of the function.

Link copied to clipboard

post-modifiers of the function.

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

right angle bracket of the type parameters if exists, otherwise null.

Link copied to clipboard

receiver type of the function if exists, otherwise null.

Link copied to clipboard

return type of the function if exists, otherwise null.

Link copied to clipboard
open override val rPar: Node.Keyword.RPar

right parenthesis of the function parameters.

Link copied to clipboard
open override val supplement: NodeSupplement

Supplemental data for the node.

Link copied to clipboard

list of type parameters of the function.