metatype

Syntax

metatype typeName;

where:

Description

The metatype statement is used to specify the metatype for which the contained scripts apply.

Examples

This code defines scripts attached to the UML Class type:

package com.mycompany.example;

metatype uml21.Class;

public script qualifiedName() : String {
    return self.namespace.name + "." + self.name;
}

private script anotherScript() {
...
}

Related concepts
Metamodel