Java Reference
In-Depth Information
transformation execution terminates if the assertion fails. This is the general syn-
tax of the assert expression:
assert [severity] condition [with log ]
For example, the following assertion checks whether a Topic element's name
attribute begins with an underscore and logs a message if it does:
init {
assert warning (not name.startsWith('_')) with
log ('Topic name begins with underscore', name);
}
Note that the surrounding parentheses are required per the grammar pro-
vided in the spec, although this is not shown in Section 8.2.2, “AssertExp.”
The default output is the severity level prefixed by ASSERT and followed by
failed at <line_number> , with optional log output shown here:
ASSERT [warning] failed at (UknownSource:27) :
Topic name begins with underscore, data: _A sub-subtopic
Transformation Composition
You can invoke one transformation from another transformation using the
transform() operation. At this time, transformation composition is not avail-
able in QVTO.
13.6 Library Operations
An implicitly imported library for all QVT transformations is the Stdlib library.
This section covers the types and operations defined in this library. Some opera-
tions that are not currently available are not covered here or are indicated as such.
For a complete list of standard library features, refer to the QVT specification.
13.6.1 Object Operations
A couple operations are defined for use on Objects.
repr
Object::repr() : String
 
Search WWH ::




Custom Search