DeclarationNode

class DeclarationNode(name: ObjectVariableNode, className: ClassNameNode, typeArguments: Arguments<ValueTypeNode>, labelArguments: Arguments<LabelNode>?, arguments: Arguments<AtomicExpressionNode>, protocol: ProtocolNode?, sourceLocation: SourceLocation) : SimpleStatementNode, ObjectDeclaration

Constructing a new object and binding it to a variable.

Constructors

DeclarationNode
Link copied to clipboard
fun DeclarationNode(name: ObjectVariableNode, className: ClassNameNode, typeArguments: Arguments<ValueTypeNode>, labelArguments: Arguments<LabelNode>?, arguments: Arguments<AtomicExpressionNode>, protocol: ProtocolNode?, sourceLocation: SourceLocation)

Functions

copy
Link copied to clipboard
open override fun copy(children: List<Node>): DeclarationNode

Returns a shallow copy of this node where the child nodes are replaced by children.

toDocument
Link copied to clipboard
override fun toDocument(): Document
toDocumentWithMetadata
Link copied to clipboard
fun toDocumentWithMetadata(metadata: Metadata): Document

Returns a pretty representation of this Node where each descendant is decorated using metadata.

toSurfaceNode
Link copied to clipboard
open override fun toSurfaceNode(metadata: Metadata): DeclarationNode

Returns a representation of this node in the surface syntax.

Properties

arguments
Link copied to clipboard
val arguments: Arguments<AtomicExpressionNode>
children
Link copied to clipboard
open override val children: Iterable<AtomicExpressionNode>
className
Link copied to clipboard
open override val className: ClassNameNode
declarationAsNode
Link copied to clipboard
open override val declarationAsNode: StatementNode
labelArguments
Link copied to clipboard
open override val labelArguments: Arguments<LabelNode>?
name
Link copied to clipboard
open override val name: ObjectVariableNode
protocol
Link copied to clipboard
val protocol: ProtocolNode?
sourceLocation
Link copied to clipboard
open override val sourceLocation: SourceLocation
typeArguments
Link copied to clipboard
open override val typeArguments: Arguments<ValueTypeNode>

Extensions

readsFrom
Link copied to clipboard
fun DeclarationNode.readsFrom(nameAnalysis: NameAnalysis, to: Set<Protocol>, from: Set<Protocol>): SelectionConstraint
sendsTo
Link copied to clipboard
fun DeclarationNode.sendsTo(nameAnalysis: NameAnalysis, from: Set<Protocol>, to: Set<Protocol>): SelectionConstraint