An attribute model represents the model of a Ceylon attribute that you can read and inspect.
An attribute is a member value: it is declared on classes or interfaces.
This is both a ValueModel and a Member: you can invoke it with an instance value
to bind it to that instance and obtain a Value:
class Outer(){
shared String foo = "Hello";
}
void test(){
Attribute<Outer,String> attribute = `Outer.foo`;
Value<String> boundAttribute = attribute(Outer());
// This will print: Hello
print(boundAttribute.get());
}
no type hierarchy
no subtypes hierarchy
| Attributes | |
declaration | Source Codeshared formal ValueDeclaration declarationThe declaration model of this attribute,
which is necessarily a |
| Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Declared |
Attributes inherited from: Member<Container,Kind> |
Attributes inherited from: Model |
Attributes inherited from: ValueModel<Get,Set> |
| Methods | |
bind | Source Codeshared formal Value<Get,Set> bind(Object container)Binds this attribute to the given container instance. The instance type is checked at runtime. Throws
Refines Qualified.bind |
| Inherited Methods |
Methods inherited from: Object |
Methods inherited from: Qualified<Kind,Container> |