Skip to content

JjOM API Reference

The JjOM API provides programmatic access to all elements in the Jjodel Object Model. You can use the API from the Console, within JjEL expressions, in viewpoint templates, and in event handlers.

PropertyTypeDescription
nameStringClass name
isAbstractBooleanWhether the class is abstract
isInterfaceBooleanWhether the class is an interface
isRootableBooleanWhether instances can be model roots
isSingletonBooleanWhether only one instance is allowed
isFinalBooleanWhether the class can be extended
isPrimitiveBooleanWhether this is a primitive type
isMetamodelBooleanWhether this belongs to the metamodel level
extendsArray<DClass>Direct parent classes
extendedByArray<DClass>Direct subclasses
attributesArray<DAttribute>Owned attributes
referencesArray<DReference>Owned references
operationsArray<DOperation>Owned operations
featuresArray<Feature>All structural features (attributes + references)
instancesArray<DObject>Direct instances of this class
allInstancesArray<DObject>All instances, including subclass instances
packagesArray<DPackage>Containing packages
parent*Parent element in the containment hierarchy
PropertyTypeDescription
idPointerUnique identifier
classNameStringName of the instantiated class
instanceOfDClassThe metaclass
parent*Containing element
PropertyTypeDescription
nameStringAttribute name
typeStringData type
PropertyTypeDescription
nameStringReference name
targetDClassTarget class
containmentBooleanWhether this is a containment reference
PropertyTypeDescription
nameStringPackage name
packagesArray<DPackage>Nested packages
objectsArray<DObject>Contained elements
// All instances of Person (including subclasses)
Person.allInstances
// Filter by attribute value
Person.allInstances.filter(p => p.name === "Alice")
// Count elements
Class.allInstances.length
// From instance to metaclass
myObject.instanceOf.name
// From class to its features
Person.attributes.map(a => a.name) // → ["name", "age"]
// From class to its subclasses
Entity.extendedBy.map(c => c.name) // → ["Person", "Organization"]
// Is this class abstract?
myClass.isAbstract // → true/false
// Can this class be used as a model root?
myClass.isRootable // → true/false