JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   16.  'JeeWiz' Reference
 


16.2 MetaClass Object

Used on
metaModel
SuperclassmetaFactor
DescriptionThe 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
1
Name  property
Type  metaProperty
Inherited from  metaFactor
 
2
Name  list
Type  metaList
Inherited from  metaFactor
 
3
Name  containedElement
Type  metaContainedElement
Inherited from  metaFactor
 
4
Name  validator
Type  metaValidator
Inherited from  metaFactor
Inherited
properties
description (base property)

template (base property)

text (base property)

jwpattern (base property)

advanced from metaElementBase.advanced

factor from metaFactor.factor

 16.2.1  Property 'name'
 16.2.2  Property 'extends'
 16.2.3  Property 'implements'
 16.2.4  Property 'useFullyQualifiedClassName'
 16.2.5  Property 'import'
 16.2.6  Property 'autoOverride'
 16.2.7  Property 'umlModelElement'
 16.2.8  Property 'umlModelStereotype'

16.2.1  Property 'name'
OverridesmetaFactor.name
DescriptionThe 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.
TypeString

16.2.2  Property 'extends'
DescriptionThe 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.
TypeString

16.2.3  Property 'implements'
DescriptionThis 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'.
TypeString

16.2.4  Property 'useFullyQualifiedClassName'
DescriptionThe '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).
Typeboolean
Defaultfalse

16.2.5  Property 'import'
DescriptionA 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.
TypeString

16.2.6  Property 'autoOverride'
DescriptionTo 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.)
Typeboolean
Defaultfalse

16.2.7  Property 'umlModelElement'
DescriptionDefines 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.
TypeString

16.2.8  Property 'umlModelStereotype'
DescriptionWhich UML element to sterotype, e.g. entity. Without a uml-model-element set, the uml-model-stereotype will be ignored.
TypeString
 


Copyright (c) 2001-2008 New Technology/enterprise Ltd.