Syntax
set type = anyObject.typeOf();
SemanticsReturns the type of any object at run-time. To get the type the object has had at compile-time use the staticTypeOf() Operation. typeOf() and staticTypeOf() may return the same type, though.
SubstitutablestypeCan be any variable or object attribute having the type String
anyObjectCan be any object.
Examples
set aString = anObject.attribute if anObject.attribute.typeOf() = "urn:Base_Types.String";

aString gets the value of anObject.attribute assigned, if the type matches.


Find below a list of all Bridge Base Types together with their type string as returned by typeOf() and staticTypeOf().

Bridge Base TypeType String
Anyurn:Base_Types.Any
Arrayurn:Base_Types.Array
Bloburn:Base_Types.Blob
Booleanurn:Base_Types.Boolean
DateTimeurn:Base_Types.DateTime
Floaturn:Base_Types.Float
Integerurn:Base_Types.Integer
Stringurn:Base_Types.String

Other, e.g. model specific, types can be referenced via their path in the containment tree, e.g. a class customer that has been defined in the UML package Services/TypeOperationsService/Classes/Customer would have the following type string:
"urn:Services.TypeOperationsService.Classes.Customer".

Example File (Builder project Basic Modeling/ClassOperation):

<your example path>\Basic Modeling\ClassOperation\uml\typeOperations.xml

  • No labels