ClassDeclaration
data class ClassDeclaration(val modifiers: List<Node.Modifier>, val declarationKeyword: Node.Declaration.ClassDeclaration.ClassOrInterfaceKeyword, val name: Node.Expression.NameExpression, val lAngle: Node.Keyword.Less?, val typeParameters: List<Node.TypeParameter>, val rAngle: Node.Keyword.Greater?, val primaryConstructor: Node.Declaration.ClassDeclaration.PrimaryConstructor?, val parents: List<Node.Declaration.ClassOrObject.ClassParent>, val typeConstraintSet: Node.PostModifier.TypeConstraintSet?, val body: Node.Declaration.ClassOrObject.ClassBody?, val supplement: NodeSupplement = NodeSupplement()) : Node.Declaration.ClassOrObject, Node.WithTypeParameters
AST node that represents a class or interface declaration. The node corresponds to KtClass.
Constructors
Link copied to clipboard
constructor(modifiers: List<Node.Modifier>, declarationKeyword: Node.Declaration.ClassDeclaration.ClassOrInterfaceKeyword, name: Node.Expression.NameExpression, lAngle: Node.Keyword.Less?, typeParameters: List<Node.TypeParameter>, rAngle: Node.Keyword.Greater?, primaryConstructor: Node.Declaration.ClassDeclaration.PrimaryConstructor?, parents: List<Node.Declaration.ClassOrObject.ClassParent>, typeConstraintSet: Node.PostModifier.TypeConstraintSet?, body: Node.Declaration.ClassOrObject.ClassBody?, supplement: NodeSupplement = NodeSupplement())
Types
Link copied to clipboard
Common interface for class or interface keywords.
Link copied to clipboard
data class PrimaryConstructor(val modifiers: List<Node.Modifier>, val constructorKeyword: Node.Keyword.Constructor?, val lPar: Node.Keyword.LPar, val parameters: List<Node.FunctionParameter>, val rPar: Node.Keyword.RPar, val supplement: NodeSupplement = NodeSupplement()) : Node, Node.WithModifiers, Node.WithFunctionParameters
AST node that represents a primary constructor. The node corresponds to KtPrimaryConstructor.
Properties
Link copied to clipboard
list of annotation sets.
Link copied to clipboard
class body if exists, otherwise null
.
Link copied to clipboard
class declaration keyword.
Link copied to clipboard
Returns true
if the node has a companion modifier, false
otherwise.
Link copied to clipboard
Returns true
if the node is an interface, false
otherwise.
Link copied to clipboard
left angle bracket of the type parameters.
Link copied to clipboard
list of modifiers.
Link copied to clipboard
name of the class.
Link copied to clipboard
list of class parents.
Link copied to clipboard
primary constructor if exists, otherwise null
.
Link copied to clipboard
right angle bracket of the type parameters.
Link copied to clipboard
Supplemental data for the node.
Link copied to clipboard
type constraint set if exists, otherwise null
.
Link copied to clipboard
list of type parameters.