JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   13.  'Java' Reference
 


13.11 ReferenceType Object

Used on
jar
Subclassed By
interface
jwclass
DescriptionThe reference type holds the common factors betweens between interfaces and classes.

Both these objects extend reference type, adding their own field and method lists. You shouldn't use reference types directly.
Contained
Lists
1
Name  typeParameter
Type  typeParameter
Description  A list of type-parameters on the reference-type.

If this is a generic type, then there will be one or more type-parameter's.

In the current implementation,

(a) type-parameters can also be specified via the name, in which case they should be in canonical form ... define. This approach should really be used as a last resort, and trigger a rethink ...! (b) once the canonical name for a reference-type is generated from a list of type-parameters, the type-parameters are ignored (in the current implementation).

Therefore, the implementation is oriented towards patterns that produce type-parameters, and modelled classes (which will then have to generate the type-parameters).
Indexed property  name
 
2
Name  import
Type  String
Description  List of classes or packages to import. The imports get put into 'import' statements in the *.java files (and could be put in a 'using' statement in C#).

In XML, you can use one or more <import> nested elements as an alternative to the 'import=' property.

See also the import list on the Business Object Model jar, which provides additional facilities.
Unique  false
Inherited
properties
text (base property)

jwpattern (base property)

 13.11.1  Property 'name'
 13.11.2  Property 'typeDeclaration'
 13.11.3  Property 'extends'
 13.11.4  Property 'description'
 13.11.5  Property 'headerComment'
 13.11.6  Property 'customerHeaderComment'
 13.11.7  Property 'template'
 13.11.8  Property 'package'
 13.11.9  Property 'generateLogLevel'

13.11.1  Property 'name'
DescriptionSpecifies name of the interface or class. This should be a valid java identifier name and will be used as-is as the interface or class name.
TypeString
Requiredtrue

13.11.2  Property 'typeDeclaration'
DescriptionThe name of this class made up of the classIdentifer (i.e. the base name of the class) plus the generic type parameters (e.g. "").
TypeString

13.11.3  Property 'extends'
DescriptionSpecifies the class or interface that this class or interface extends from. This field is optional.

The value of 'extends' can be

  • an external class - in which case it must have a '.' in it
  • a reference to a class or interface in another model, in 'model:object' form
  • or the name of a class or interface in this model, without either a '.' or ':'.
References to simple classes must be fully-qualified if the referenced class is not in the same package as the current class. Business objects (entities, sessions, etc.) in the businessObject model normally reference each other by name only and there is then a restriction that business object names of a certain type must be unique (e.g. you can't have two entities named 'E').

The 'extends' type is added to the 'implements' list in C# and the appended to the class name with ':' (e.g. "class C : ExtendedClass,ImplementedInterface {}" ).

In Java systems, the 'extends' keyword is used.
TypeString

13.11.4  Property 'description'
DescriptionOptional description.

Use this to
  1. document the meaning of a particular item
  2. specify functionality at the design stage for implementation later.
TypeString
Support Element Inputstrue

13.11.5  Property 'headerComment'
DescriptionOptional header comment. If present, this is placed in a comment at the top of the generated file.

This is typically used for a copyright statement.

This is a delegated property - it can be added to the jar (or the application if present) and will be used for all children.
TypeString
Delegatestrue
Support Element Inputstrue

13.11.6  Property 'customerHeaderComment'
DescriptionOptional customer header comment.

If present, this is placed in a comment at the top of generated files that will be maintained by the customer.

This is typically used for a customer copyright statement.

This is a delegated property - it can be added to the jar (or the application if present) and will be used for all children.
TypeString
Delegatestrue
Support Element Inputstrue

13.11.7  Property 'template'
DescriptionThe template property is a hint to the code-generation scripts.

If the object has a number of variants in a particular rendering, this value can be used to select the variant.

There is currently no special support in the generator for template scripts and this feature is not used in any JeeWiz-provided scripts. However, if you are writing local variants of the scripts, you can use it to give minor variations of functionality.

If you are used to 'stereotypes' in UML modelling, this interacts with JeeWiz as follows:

  • some well-known stereotypes (entity or EJBEntityBean / boundary) translate directly to JeeWiz objects, producing / in the XML specification
  • in addition, any steretype from UML is added to the JeeWiz object as the template property.
TypeString

13.11.8  Property 'package'
Aliasnamespace
DescriptionThis is the package attribute: it declares the name of the package that this interface (or class, or entity, etc.) belongs to.

It can be used on

  • reference types (interfaces and classes) and all their derivatives
  • associations
  • assemblies of model-objects
  • containers of same, like jars.
It uses delegation of responsibility to search its parent chain. For example, in the J2EE realm, this means that the package can be specified on (working up the containment chain):

  • an entity,
  • or its ejb-jar,
  • or the application,
  • or in the assembly
  • or in the build properties '.jwp' file.
If none of these is specified the package will be null. Null packages are not recommended but legal for simple Java builds. For larger systems, null packages are not allowed.

The combination of the package and class name (i.e. the fully-qualified Java classname) must be unique across all reference types and their derivatives in a build.
TypeString
Delegatestrue

13.11.9  Property 'generateLogLevel'
DescriptionShould be a number for the trace level priority to generate code. Any lower priority traces will be filtered out at *generate* time. Most tracing mechanisms, such as log4j, can also filter traces at run-time.

The priorities are
  • 1 = Fatal
  • 2 = Error
  • 4 = Warning
  • 6 - Info
  • 8 - Debug (Fine)
  • 9 - DetailedDebug (Finest)
This is a delegated property.

The default can be set for builds by setting generateLogLevel in the build properties.
TypeString
Delegatestrue
 


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