A callable constructor model represents the model of a Ceylon class value constructor that you can get and inspect
As with Value you can also get the value of a ValueConstructor,
doing so obtains instance:
shared class Color {
shared String hex;
shared new black {
this.hex="#000000";
}
shared new white {
this.hex="#ffffff";
}
}
void test() {
ValueConstructor<Color> ctor = `Color.black`;
// This will print: #000000
print(ctor.get());
no type hierarchy
no subtypes hierarchy
| Attributes | |
container | Source Codeshared formal Class<Type,Nothing>? containerThe class containing this constructor; the type of instances produced by this constructor. |
declaration | Source Codeshared formal ValueConstructorDeclaration declarationThis value's declaration. |
type | Source Codeshared formal Class<Type,Nothing> typeThis value's closed type. Refines ValueModel.type |
| Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Declared |
Attributes inherited from: Model |
Attributes inherited from: ValueModel<Get,Set> |