A value declaration.
A value declaration declares the name
and type
of the value,
but doesn’t provide a definition
for it. There are several possible reasons for this:
formal
attribute and be a member of an abstract
classIn any case, the declaration must explicitly specify a type;
a Modifier
indicating type inference cannot be used.
(The ’dynamic
’ modifier counts as a “type” here, indicating
not the inference, but rather the absense of typing information.)
Anything
ValueDeclaration
AnyValue
TypedDeclaration
Declaration
Node
Object
Anything
no subtypes hierarchy
Initializer |
ValueDeclaration(MemberName name, Type|VariadicType|DynamicModifier type, Annotations annotations = ...) Parameters:
|
Attributes | |
annotations | Source Codeshared actual Annotations annotations The annotations of the declared value. Refines Declaration.annotations |
children | Source Codeshared actual [Annotations, Type|VariadicType|DynamicModifier, LIdentifier] children The child nodes of this node. |
definition | Source Codeshared actual Null definition A value declaration has no definition. Refines TypedDeclaration.definition |
hash | Source Codeshared actual Integer hash The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:
Therefore, a class which refines In general, Note that when executing on a Java Virtual Machine, the
64-bit Refines Object.hash |
name | Source Codeshared actual MemberName name The name of the declared value. |
type | Source Codeshared actual Type|VariadicType|DynamicModifier type The type of the declared value. This can be:
Refines TypedDeclaration.type |
Inherited Attributes |
Attributes inherited from: AnyValue |
Attributes inherited from: Declaration |
Attributes inherited from: Node |
Attributes inherited from: Object hash , string |
Attributes inherited from: TypedDeclaration |
Methods | |
copy | Source Codeshared ValueDeclaration copy(MemberName name = ..., Type|VariadicType|DynamicModifier type = ..., Annotations annotations = ...) Parameters:
|
equals | Source Codeshared actual Boolean equals(Object that) Determine if two values are equal. For any two non-null objects x == y Implementations should respect the constraints that:
Furthermore it is recommended that implementations
ensure that if A class which explicitly refines Note that an implementation of Refines Object.equals |
transform | Source Codeshared actual Result transform<out Result>(Transformer<Result> transformer) Transform this node with the given If you have a Refines Node.transform |
visit | Source Codeshared actual void visit(Visitor visitor) Visit this node with the given Refines Node.visit |
Inherited Methods |
Methods inherited from: Node |
Methods inherited from: Object equals |