Declaration model for value constructors, for example
class Currency { "The US Dollar" shared new usd {} // ... } ValueConstructorDeclaration dollars = `new Currency.usd`;
CallableConstructorDeclaration
no type hierarchy
no subtypes hierarchy
Attributes | |
container | Source Codeshared formal ClassDeclaration container The class this constructor constructs Refines NestableDeclaration.container |
Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Declaration |
Attributes inherited from: NestableDeclaration |
Attributes inherited from: TypedDeclaration |
Methods | |
apply | Source Codeshared formal ValueConstructor<Result> apply<Result = Anything>() Apply the given closed type argument to this toplevel value constructor to obtain as value constructor model. |
get | Source Codeshared actual default Object get() Reads the current value of this toplevel value. Refines GettableDeclaration.get |
memberApply | Source Codeshared formal MemberClassValueConstructor<Container,Result> memberApply<Container = Nothing, Result = Anything>(Type<Object> containerType) Apply the given closed type argument to this member value constructor to obtain as value constructor model. |
memberGet | Source Codeshared actual default Object memberGet(Object container) Reads the current value of this attribute on the given container instance. Throws
Refines GettableDeclaration.memberGet |
Inherited Methods |
Methods inherited from: Object |
Methods inherited from: Annotated |
Methods inherited from: AnnotatedDeclaration |
Methods inherited from: GettableDeclaration |