|
|
|
The Model-Driven System Builder
|
|
JeeWiz Architect's Guide
|
|
|
|
Contents >
13. 'Java' Reference
|
|
|
13.6 Jar Object
| Description | The Java 'jar' meta-class is a grouping of reference types - interfaces, jwclasses and their derivatives.
When rendering to Java, this will create a Java jar file.
|
| Implements | ClassIndexer |
Contained Lists |
| 1 |
|
| |
| 2 |
| Name | jarGlobalImports |
| Type | String |
| Description | List of packages to import into the Jar.
The packages specified on this list are included in the import statement on *all* generated Java files in the Jar.
The individual names on this list (e.g. "jeewiz.test") will have ".*" appended, so the import statement will be "import jeewiz.test.*;".
The imports get put into 'import' statements in the *.java files (or 'using' in C#, maybe).
The complete list of imports put into a interface or class in a Jar is
- the imports listed in the interface or class, plus
- the Jar's jar-global-imports list, plus
- all the packages (as 'package.*') from all the interfaces or classes in the jar, if the create-aggregate-imports is true (which is the default, as described above).
In the JeeWiz editor, multiple external classes or packages may be specified as the jar-global-imports property using a comma separated list.
In XML, you can use one or more nested elements as an alternative to the 'jarGlobalImports=' property.
|
| Unique | false |
|
|
Inherited properties |
| template |
(base property)
| |
| jwpattern |
(base property)
| |
|
13.6.1 Property 'name'
|
| Description | The name of the jar (e.g. 'myjar.jar'). The output jar goes in the $projectDir/dest directory.
No extension is added automatically, so if you want to create a jar you must add '.jar'.
|
| Type | String |
| Default | jar1 |
13.6.2 Property 'extraJavacProperties'
|
| Description | Extra properties to be passed to the Ant Javac task.
You should not set the Ant 'destdir' as one of these extra properties: this is generated automatically.
The generated destdir includes the classpath, which is necessary to compile in most cases.
|
| Type | String |
13.6.3 Property 'extraJavacElements'
|
| Description | Extra nested elements to be passed to the Ant Javac task.
Note that this allows you to specify additional 'src' nested elements, which will be added to the sources generated by JeeWiz.
|
| Type | String |
13.6.4 Property 'extraJarProperties'
|
| Description | Extra properties to be passed to the Ant Jar task.
|
| Type | String |
13.6.5 Property 'createAggregateImports'
|
| Alias | create-aggregate-using-statements |
| Description | When this flag is set, all the packages of the interfaces and classes defined in the jar are automatically added to the import lists of all files generated by JeeWiz for the Jar.
If you have a jar constructed from multiple packages, you can set this and not have to worry about inter-package references.
The default is that this is true in Java.
See also jar-global-imports.
|
| Type | boolean |
| Default | true |
13.6.6 Property 'description'
|
| Description | Optional description.
Use this to
- document the meaning of a particular item
- specify functionality at the design stage for implementation later.
|
| Type | String |
| Support Element Inputs | true |
13.6.7 Property 'headerComment'
|
| Description | Optional 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.
|
| Type | String |
| Delegates | true |
| Support Element Inputs | true |
13.6.8 Property 'customerHeaderComment'
|
| Description | Optional 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.
|
| Type | String |
| Delegates | true |
| Support Element Inputs | true |
13.6.9 Property 'package'
|
| Alias | namespace |
| Description | This 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.
|
| Type | String |
| Delegates | true |
13.6.10 Property 'text'
|
13.6.11 Property 'generateLogLevel'
|
| Description | Should 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.
|
| Type | String |
| Delegates | true |
Copyright (c) 2001-2008 New Technology/enterprise Ltd.
| |