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 :

  1. // Instantiate meta-model
  2. MMetamodel metamodel = new MMetamodel();
  3. // Find "Attribute" metaclass
  4. MClass mClass = metamodel.getClassByName("Attribute");
  5. // Find SuperType of Attribute meta-class
  6. String superType = "null";
  7. if(mClass.getMSuperType().size() > 0){
  8. `superType = mClass.getMSuperType().get(0).getName();`
    
  9. }
  10. System.out.println("class " + mClass.getName() + " : " + superType);
  11. // Find attibutes of Attribute meta-class
  12. for(MAttribute mAttr : mClass.getMAttributes()){
  13. `System.out.println("  - " + mAttr.getName() + " : " + mAttr.getMDataType().getName());`
    
  14. }
  15. // Find dependency of Attribute meta-class
  16. for(MDependency mDep : mClass.getMDependencys()){
  17. System.out.println(" ++ " + mDep.getName() +" : " + mDep.getMClass().getName());
  18. }