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 = ``;
    Value<String> boundAttribute = attribute(Outer());
    // This will print: Hello

no type hierarchy

no subtypes hierarchy

declarationSource Codeshared formal ValueDeclaration declaration

The declaration model of this attribute, which is necessarily a ValueDeclaration.

Refines ValueModel.declaration ultimately refines Declared.declaration
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>
bindSource Codeshared formal Value<Get,Set> bind(Object container)

Binds this attribute to the given container instance. The instance type is checked at runtime.

  • StorageException

    If this attribute is not stored at runtime, for example if it is neither shared nor captured.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Qualified<Kind,Container>