|
||||||||||||||||||||||||||||||||||||||||
Unit annotations are stylized Java comments that can be easily
accessed by the gather application. Each unit annotation defines an XML element
that describes the associated software unit. Two kinds of XML elements are
captured by unit annotations. Interaction elements, such as
<declare>, <extend>, and <use>,
define the permissible interactions among composable units. The
<concern> element specifies additional dimensions of concern for
each unit.
These annotations are largely experimental. For robust program composition, these elements will need flexible namespace management mechanisms. XML namespaces provide a powerful mechanism, and may be sufficient for integrating independently developed subsystems. Warning: these XML element defintiions are subject to change!! |
||||||||||||||||||||||||||||||||||||||||
Syntax and Gather Characters | ||||||||||||||||||||||||||||||||||||||||
Unit annotations take the form of a Java comment with a
distinctive XML-like prefix ("//<"). The gather application
collects each line and reformats it as a standard XML element. Additional
options allow the gather application to collect the Java definitions of each
software unit.
Following the unit annotation prefix is a gather marker that defines the lexical handling for each annotation. The gather marker defines whether a unit definition is included as the text content of the element. The gather marker also indicates if the annotation has any nested annoations. Typically, class units have nested annotations for public fields and methods. Successful use of the gather markers requires that each Java unit is defined on a single line. Forturnately, this assumption follows widely accepted practice in Java development.
|
||||||||||||||||||||||||||||||||||||||||
Interaction Elements | ||||||||||||||||||||||||||||||||||||||||
The three basic interaction elements - <declare>,
<extend>, and <use> - define the anticipated role
each annotated unit. During composition, a named interface should not be
extended or used unless there is exactly one declaration. Future validation
tools will confirm that each interface is extended or used only by compatible
units.
Other interaction elements describe combination roles. For example, the <define> element indicates an interface that is both <declare>d and <extend>ed. The -use variations indicate that another unit in the current module also calls (i.e. "relies-on") the annotated unit. Interaction elements include a name and form attributes to define the symbolic name and form of each software unit. The mode attribute is only used with the <declare>, <define>, and <extend> elements (including their -use variations).
|
||||||||||||||||||||||||||||||||||||||||
Concern Element | ||||||||||||||||||||||||||||||||||||||||
Concern elements bind individual units to hyperspace dimensions
outside their Java class hierarchy. Concern elements permit cross-referencing
and validation of the universe of composition. The concern element has only two
attributes, dimension and coordinate. Concern elements are nested elements of
an interaction unit.
A concern annotations takes the following form: //<- concern dimension="dimension" coordinate="" />Note that the a unit annotation for a concern element uses the "-" gather marker and that it defines an empty element using the /> terminating sequence. |
||||||||||||||||||||||||||||||||||||||||
Unit Form Attribute Values | ||||||||||||||||||||||||||||||||||||||||
The form attribute defines the form of each software
unit.
For Java, the following unit forms are recognized:
Future work may support automated collection of this attribute though analysis of the Java source code. |
||||||||||||||||||||||||||||||||||||||||
Interaction Mode Attribute Values | ||||||||||||||||||||||||||||||||||||||||
The mode attribute defines the intended interaction mode
for this unit. Each interaction mode defines a specific set permissible
composition behaviors. The two basic composition modes are fusion and
dispatch. Some extended and aggregate composition modes are also
supported (e.g. singelton, after, before).
The following interaction modes are recognized:
|
||||||||||||||||||||||||||||||||||||||||
Dimensional Mode Element Values | ||||||||||||||||||||||||||||||||||||||||
The following dimensionsal modes are recognized in
dimension.xml files:
|
||||||||||||||||||||||||||||||||||||||||
|