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
left angle bracket of the type parameters if exists, otherwise null
.
Link copied to clipboard
left parenthesis of the function parameters.
Link copied to clipboard
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
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
right parenthesis of the function parameters.
Link copied to clipboard
Supplemental data for the node.
Link copied to clipboard
list of type parameters of the function.