ObjectDeclaration

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

Constructors

Link copied to clipboard
constructor(modifiers: List<Node.Modifier>, declarationKeyword: Node.Keyword.Object, name: Node.Expression.NameExpression?, parents: List<Node.Declaration.ClassOrObject.ClassParent>, body: Node.Declaration.ClassOrObject.ClassBody?, supplement: NodeSupplement = NodeSupplement())

Properties

Link copied to clipboard

list of annotation sets.

Link copied to clipboard

body of the class if exists, otherwise null.

Link copied to clipboard

keyword that is used to declare a class, interface or object.

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 modifiers: List<Node.Modifier>

list of modifiers.

Link copied to clipboard

name of the declaration if exists, otherwise null.

Link copied to clipboard

list of class parents.

Link copied to clipboard
open override val supplement: NodeSupplement

Supplemental data for the node.