ModelioMetamodelLib - aabherve/modelio-metamodel-lib GitHub Wiki
ModelioMetamodelLib is a library providing services to navigate and explore the Modelio 3.4.1 meta-model This Library has been generated using the ModelioMetaGenerator-1.0.0 tool
Usage examples :
// Instantiate meta-model
MMetamodel metamodel = new MMetamodel();
// Find "Attribute" metaclass
MClass mClass = metamodel.getClassByName("Attribute");
// Find SuperType of Attribute meta-class
String superType = "null";
if(mClass.getMSuperType().size() > 0){
-
`superType = mClass.getMSuperType().get(0).getName();`
}
System.out.println("class " + mClass.getName() + " : " + superType);
// Find attibutes of Attribute meta-class
for(MAttribute mAttr : mClass.getMAttributes()){
-
`System.out.println(" - " + mAttr.getName() + " : " + mAttr.getMDataType().getName());`
}
// Find dependency of Attribute meta-class
for(MDependency mDep : mClass.getMDependencys()){
System.out.println(" ++ " + mDep.getName() +" : " + mDep.getMClass().getName());
}