Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "ATL Standard Library"

m (added backlink to ATL)
(added category ATL)
Line 85: Line 85:
 
The ''Map'' OCL type is implemented by the [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMMap.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMMap] Java class.
 
The ''Map'' OCL type is implemented by the [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/ATL/org.atl.engine.vm/src/org/atl/engine/vm/nativelib/ASMMap.java?rev=HEAD&content-type=text/vnd.viewcvs-markup ASMMap] Java class.
 
The underlying Java type is [http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html java.util.HashMap].
 
The underlying Java type is [http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html java.util.HashMap].
 +
 +
[[Category:ATL]]

Revision as of 05:11, 20 September 2006

< To: ATL

The ATL standard library consists of the types built into ATL and of their operations. It is based on the OCL 2.0 standard library as described in chapter 11 of the UML 2.0 OCL Final Adopted specification. However, some extensions have been made (see ATL_FAQ#How_close_is_ATL_navigation_language_from_the_OCL_2.0_standard.3F).

For each type T, a CVS link is given to the Java class implementing T in the ATL virtual machine. In each class, operations available from the ATL language (as opposed to implementation-specific methods) are represented as Java methods located below the following comment:

 // Native Operations Below

In some of these classes, there are two additional comments delimiting:

  • Operations specified by OCL 2.0:
 // OCL Operations
  • Operations added in ATL:
 // Additional Operations

All of these Java classes are located in the org.atl.engine.vm.nativelib package.

When the description given here is not complete enough, it is possible to go and read the Java implementation. This way, it is possible to know, for instance: the list of available operations and their semantics (e.g. operation String.regexReplaceAll(a : String, b : String) is implemented in ASMString using java.lang.String.replaceAll(String a, String b)).

Primitive Types

Boolean

The Boolean OCL type is implemented by the ASMBoolean Java class. The underlying Java type is boolean.

Integer

The Integer OCL type is implemented by the ASMInteger Java class. The underlying Java type is int.

Real

The Real OCL type is implemented by the ASMReal Java class. The underlying Java type is double.

String

The String OCL type is implemented by the ASMString Java class. The underlying Java type is java.lang.String.

Collection Types

Collection

The Collection OCL type is implemented by the ASMCollection Java class. There is no underlying Java type for this abstract type. However, all concrete collection types are implemented by sub-classes of java.util.Collection.

Bag

The Bag OCL type is implemented by the ASMBag Java class. The underlying Java type is java.util.ArrayList.

OrderedSet

The OrderedSet OCL type is implemented by the ASMOrderedSet Java class. The underlying Java type is java.util.LinkedHashSet.

Sequence

The Sequence OCL type is implemented by the ASMSequence Java class. The underlying Java type is java.util.ArrayList.

Set

The Set OCL type is implemented by the ASMSet Java class. The underlying Java type is java.util.HashSet.

Additional Types

The types described in this section are not part of the OCL 2.0 specification.

Map

The Map OCL type is implemented by the ASMMap Java class. The underlying Java type is java.util.HashMap.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.