Members
Four kinds of declared members
A Block declares its members as Properties, Aggregations, Associations, and Capabilities — four kinds that together describe everything a Block holds and does.
The four kinds at a glance
Every member a Block declares classifies into exactly one of these four kinds:
- Property
A scalar or structured value member.
- Aggregation
An owned collection filled by composition.
- Association
A non-owning instance-to-instance link.
- Capability
Behaviour, with an optional language-tagged implementation body.
One shared declaration pattern
All four member kinds extend the same MemberDefinition base, so abstract, final, override, and visibility work identically regardless of which kind is being declared.
One Block, three member kinds
A single Block can declare several member kinds side by side, each inside its own member container.
<!-- One Property, one Aggregation, and one Capability, each in its own container -->
<acme:Widget xmlns="http://blockml.org/bml"
xmlns:acme="com.acme.example"
xmlns:core="org.blockml.bml.core"
xmlns:type="org.blockml.bml.type"
xmlns:lang="org.blockml.bml.language">
<baseType>
core:Block
</baseType>
<properties>
<count type="type:Integer" />
</properties>
<aggregations>
<keywords type="type:TextEntity">
<documentation>Search keywords for this Widget.</documentation>
</keywords>
</aggregations>
<capabilities>
<describe type="type:Text">
<implementation language="lang:PseudoCode">
return "Widget #" + #this.count
</implementation>
</describe>
</capabilities>
</acme:Widget>
count sits inside properties, keywords sits inside aggregations, and describe sits inside capabilities — each container in the example names its kind directly, so classifying any member here is just reading which container it sits in.
What to carry into the next pages
After this page, readers should be able to name the four member kinds and pick the right one for a given need, before Properties get their own page next.