/** * @description An example of a definition library * @author Joanna Chimiak-Opoka */ library deflib metamodel uml protected definitions context Model /** * @description An example of a variable definition */ def example_variable: example_variable : Integer = 100 /** * @description Gets a class by name * from the set of all class instances */ def getClassByName: getClassByName(aName:String) : Class = Class.allInstances()->any(name=aName) enddefinitions protected definitions context Class /** * @description Gets a number of attributes for the context class */ def numberOfAttributes: numberOfAttributes() : Integer = self.getAllAttributes() -> size() enddefinitions endlibrary