|
|
|
The Model-Driven System Builder
|
|
JeeWiz Architect's Guide
|
|
|
|
Contents >
16. 'JeeWiz' Reference
|
|
|
16.2 MetaClass Object
| Used on |
|
| Superclass | metaFactor |
| Description | The meta-class defines an object (or class) at the meta-modelling layer.
This specification is converted into a Java class.
Extra Java code for the class can be included as character data within the meta-class's XML element.
|
Contained Lists |
|
Inherited properties |
|
16.2.1 Property 'name'
|
| Overrides | metaFactor.name |
| Description | The name of the meta-class. For example, in the business object meta-model, meta-class names include 'session', 'entity', 'relation'.
Note that because of the conflict with the name 'class', class meta-classes in JeeWiz are named 'jwclass'.
The convention is that in meta-models, meta-classes are named using '-' between part-names, as in the name 'meta-class' itself.
Where appropriate, for example in the Java build-time objects, this is converted to an appropriate class name
by removing the '-', then capitalizing all words, including the first word.
In other words, 'meta-contained-element-base' produces the class named MetaContainedElementBase.
|
| Type | String |
16.2.2 Property 'extends'
|
| Description | The meta-class this extends.
For example, the properties of a field on a Java interface are a subset of the properties allowed on a field in a class.
Therefore, we define the (class) field meta-class by reference to the interface field meta-class.
So, field extends interface-field.
This must be the name of another meta-class.
(All meta-classes must use the BaseBuildComponent as their ultimate parent, so meta-classes cannot extend to any class.)
If the extended meta-class is in the same meta-model, refer to it by name: e.g. 'extends=interface-field"'.
If the extended meta-class is in another meta-model, precede the object name by the meta-model's name and ':':
e.g. 'extends="java:interface"'.
The name of the meta-model referenced here comes from the meta-model's specification, assembly.xml file, object, name property.
|
| Type | String |
16.2.3 Property 'implements'
|
| Description | This names the interace (or comma-separated list of interfaces) that this meta-class implements.
The interfaces so named are not meta-modelled.
Instead, they are picked up during compilation from the meta-models' extra source - 'specification/src' - directory.
For example, the extra source for the Java (object) meta-model is at 'jeewiz\resources\object\specification\src'.
|
| Type | String |
16.2.4 Property 'useFullyQualifiedClassName'
|
| Description | The 'useFullyQualifiedClassName' property can be set when there is a conflict between the bare type name
and another class name in the compilation unit.
This property can be set automatically by the generator where a meta-class has the same class name as a meta-class in a base meta-model.
If this is set, the generated Java code will automatically include the package in references to the class name
(for example, in the 'extends' clause).
|
| Type | boolean |
| Default | false |
16.2.5 Property 'import'
|
| Description | A comma-separated list of imports.
Note that unlike imports in models, imports at the meta-model layer cannot be specified as nested elements -
they must be specified in this property.
|
| Type | String |
16.2.6 Property 'autoOverride'
|
| Description | To understand auto-override, consider the situation where you want to amend a meta-class for a particular situation.
Specifying the new meta-class itself is straightforward - you will need to create a new meta-model, and a meta-class in that meta-model.
However, the meta-model you are overriding will have special linkages built into it to select the correct
meta-meta-class based on its presence in a particular list.
For example, in the Java ('object') meta-model, when the engine encounters a 'method' element nested inside a 'jwclass' element
(or, in Java terms, a 'method' object on a 'jwclass' list)
it creates a Method meta-class at run time.
If you want to build an enhanced meta-class, then you will need to override the method-jwclass linkage to add your own override.
To do this you must
- make your meta-class's name the same as the one you are overriding
- set the 'auto-override' property to true - this feature is disabled by default..
(If you set auto-override and there is no suitable class available, then it will be silently ignored.)
|
| Type | boolean |
| Default | false |
16.2.7 Property 'umlModelElement'
|
| Description | Defines that this meta-class should appear on a UML diagram, and also defines which class it should appear as.
This property is used by UML plug-in generators.
Leaving the uml-model-element undefined is an indication that the meta-class does not relate to a UML component
and implies that a UML / JeeWiz conversion does not need to consider this particular meta-class.
|
| Type | String |
16.2.8 Property 'umlModelStereotype'
|
| Description | Which UML element to sterotype, e.g. entity. Without a uml-model-element set, the uml-model-stereotype will be ignored.
|
| Type | String |
Copyright (c) 2001-2008 New Technology/enterprise Ltd.
| |