PropertyDeclaration

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.

Constructors

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

Types

Link copied to clipboard

Common interface for property accessors. The node corresponds to KtPropertyAccessor.

Link copied to clipboard
data class Getter(val modifiers: List<Node.Modifier>, val lPar: Node.Keyword.LPar?, val rPar: Node.Keyword.RPar?, val type: Node.Type?, val postModifiers: List<Node.PostModifier>, val body: Node.Expression?, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration.PropertyDeclaration.Accessor

AST node that represents a property getter.

Link copied to clipboard
data class Setter(val modifiers: List<Node.Modifier>, val lPar: Node.Keyword.LPar?, val parameter: Node.FunctionParameter?, val rPar: Node.Keyword.RPar?, val postModifiers: List<Node.PostModifier>, val body: Node.Expression?, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration.PropertyDeclaration.Accessor

AST node that represents a property setter.

Properties

Link copied to clipboard
Link copied to clipboard

list of annotation sets.

Link copied to clipboard

property delegate of the property if exists, otherwise null. When the property has an initializer, the delegate must be null.

Link copied to clipboard

initializer expression of the property if exists, otherwise null. When the property has a delegate, the initializer must be 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

( keyword if exists, otherwise null. When there are two or more variables, the keyword must exist.

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

list of modifiers.

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 property if exists, otherwise null.

Link copied to clipboard

) keyword if exists, otherwise null. When there are two or more variables, the keyword must exist.

Link copied to clipboard
open override val supplement: NodeSupplement

Supplemental data for the node.

Link copied to clipboard

type constraint set of the property if exists, otherwise null.

Link copied to clipboard

list of type parameters of the property.

Link copied to clipboard
Link copied to clipboard

variables of the property. Always at least one, more than one means destructuring.