JeeWiz Home

 
  
 
Contents  >   7.  GigaSystemBuilder Profile Reference
 


7.6 Class Object

Used on
jar
processingUnit
Contained
Lists
1
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
 
2
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).
GenerateAllList  false
 
3
Name  implements
Type  String
Description  Specifies the interface(s) which this class implements.
Unique  false
 
4
Name  field
Type  field
Description  List of field members
Indexed property  name
 
5
Name  method
Type  method
Description  List of methods, including constructors, on the class.
Indexed property  name
 
6
Name  intEnum
Type  intEnum
Description  List of simplified int-enums on the class or interface.
Indexed property  name
 
7
Name  annotation
Type  String
Description  An optional list, comma-separated, of Java annotations.

You can put the '@' as the first character on the annotation, but it is not necessary.

You can add the annotation as either

    • an XML element, with the CDATA being the annotation text
    • a property which can contain multiple annotations, comma-separated.
If you use the property form, you cannot add multiple element-pair values as the syntax conflicts with the comma-separation syntax. In other words, annotation="@Annotation(id=27,name='Fred')" will be parsed into two separate annotations, and then inserted into the code as "@Annotation(id=27" and "@name='Fred')", which is incorrect syntax.

Because of this, some modelling environments allow annotations to be added as a property (this is most convenient) and as a list (this allows complex annotations).
Unique  false
 
8
Name  spaceHashMap
Type  spaceHashMap
Indexed property  name
 
9
Name  spaceDelayQueue
Type  spaceDelayQueue
Indexed property  name
Inherited
properties
template (base property)

text (base property)

jwpattern (base property)

 7.6.1  Property 'abstract'
 7.6.2  Property 'access'
 7.6.3  Property 'description'
 7.6.4  Property 'extends'
 7.6.5  Property 'name'
 7.6.6  Property 'package'
 7.6.7  Property 'shared'

7.6.1  Property 'abstract'
DescriptionThis is the 'abstract' modifier, as used on interfaces, jwclasses and methods.
Typeboolean
Defaultfalse

7.6.2  Property 'access'
DescriptionSpecifies the access control for the attribute.

The default access is specifically null, so that there is no access control value placed in the code. This is necessary because the default for the access changes depending on the context.
TypeString
Choices private (default)
protected
public
Default\null

7.6.3  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

7.6.4  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

7.6.5  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

7.6.6  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

7.6.7  Property 'shared'
DescriptionBy default in GigaSystemBuilder, standard classes and JavaBeans are shared. This means they are put into the GSBFramework jar. If you want them to be local to the PU they are defined in, set this 'shared' property to false. In that case, they will not be visible outside the PU. If you do this, you will have to make sure that any inheritance chain is reachable. For example, if class/Bean A extends class/bean B, you can't have A being shared but B not shared, because B would not be visible to A during compilation. Classes with init-method's and destroy-method's are forced to have 'shared' set to false. They must go into the PU because the implementation accesses PU-specific resources.
Typeboolean
Defaulttrue

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