ROSE / JAVA MAPPING
02 June, 1998
This document describes the proposed mapping for Rose/Java.
The document has five major sections. The first defines terms which are used in subsequent sections. The second describes the mapping of Java constructs to Rose modeling elements. The third and fourth describe functionality particular to forward and reverse engineering, respectively. The last defines the Rose/Java property sets.
Fundamental type – denotes one of the following: boolean, byte, char, double, float, int, long, short
This section is organized by Java construct. For each construct the following items are provided, as appropriate:
· How the construct maps to a Rose element(s).
· A semantic definition of the construct. Within this definition, normal font is used for literal text and italics are used for text which corresponds to something in the Rose model.
· A definition of how the italicized items map to Rose model elements.
· Property definition and usage.
· Notes.
Maps to the Project.ClassPath property which is a semicolon-delimited list of fully qualified directory names. This is appended to the CLASSPATH environment variable to create an extended CLASSPATH used during both forward and reverse engineering to resolve the physical location of Java files.
PROPERTIES
Project Properties
· ClassPath (String "") - Extend the CLASSPATH environment variable with additional entries.
Note: If there is no entry in the extended CLASSPATH which ends with "lib\classes.zip" an attempt is made to locate the JDK library in the following way:
· An attempt is made to locate the file bin\javac.exe in one of the entries of the PATH environment variable
· If such a file is located, as <installdir>\bin\javac.exe for example, an attempt is made to locate the file <installdir>\lib\classes.zip.
· If found, it is added to the extended CLASSPATH
Maps to a Rose component package. The name of the component package is the same as the name of the Java package.
Maps to a Rose component whose assigned language is Java. The name of the component is the same as the simple name of the file. The extension of the file is "java".
Maps to a dependency relationship between two components, a component and a package, or any kind of relationship between classes which are not realized in the same package.
JAVA SEMANTICS
import package
import component
package, component – see the Generating imports section for a description of how these are generated
Maps to a Rose class.
JAVA SEMANTICS
[modifiers] class identifier [ extends super1] [implements super2, … ] {
nested_1;
nested_2;
…;
field_1;
field_2;
…;
method_1;
method_2;
…
};
modifiers = defined as follows:
public | protected | private = class' export selection (implementation type is used for package visibility).
abstract = class' abstract selection
final = Class.Final property
static = Class.Static property
identifier = class name
super1 = name of superclass, if any, which represents an extended class
super2, … = name of superclass(es), if any, which represent implemented interfaces
nested = nested class
field = class attribute/role
method = class operation
PROPERTIES
Class Properties
· Final (Boolean FALSE) – Indicates whether the class is final
· Static (Boolean FALSE) – Indicates whether the class is static
Note: For a definition of the fields and methods contained in a class see the FIELD and METHOD sections.
Maps to a Rose class whose stereotype is <Interface>.
JAVA SEMANTICS
[modifiers] interface identifier [ extends super1, …] {
field_1;
field_2;
…;
method_1;
method_2;
…
};
modifiers = defined as follows:
public = class' export selection (implementation type is used for package visibility).
abstract = class' abstract selection
identifier = class name
super1, … = name of superclass(es), if any, which represent extended interfaces
field = class attribute/role
method = class operation
Note: For a definition of the fields and methods contained in a class see the FIELD and METHOD sections.
Maps to a Rose class whose stereotype is <Delegate> or <Multicast> and which contains an operation called Invoke.
JAVA SEMANTICS
[modifiers] [multicast] delegate returntype identifier (paramtype1 paramname1, …) [throws exception1, …];
The keyword 'delegate' always appears in this definition. If the stereotype of the class is <Multicast> then the keyword 'multicast' also appears. All of the remaining elements of the definition are generated based on the Invoke operation included in the class. Their semantics are exactly the same as those described for a method in the METHOD section.
Java fields map to attributes or roles in the Rose model.
JAVA SEMANTICS
[modifiers] type declarator = initvalue;
modifiers = defined as follows:
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.