{"id":16487137,"url":"https://github.com/vsimko/xmf","last_synced_at":"2026-02-03T00:40:13.912Z","repository":{"id":26120504,"uuid":"29565002","full_name":"vsimko/xmf","owner":"vsimko","description":"Xtend-centric meta-model specification","archived":false,"fork":false,"pushed_at":"2015-01-24T23:18:22.000Z","size":544,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T16:18:09.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Xtend","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsimko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-21T01:37:47.000Z","updated_at":"2016-02-17T10:43:06.000Z","dependencies_parsed_at":"2022-08-25T17:10:45.635Z","dependency_job_id":null,"html_url":"https://github.com/vsimko/xmf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsimko%2Fxmf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsimko%2Fxmf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsimko%2Fxmf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsimko%2Fxmf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsimko","download_url":"https://codeload.github.com/vsimko/xmf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241289139,"owners_count":19939026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T13:32:49.436Z","updated_at":"2026-02-03T00:40:13.867Z","avatar_url":"https://github.com/vsimko.png","language":"Xtend","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XMF: Xtend-centric meta-model specification\nUsing Xtend active annotations, the following code is converted automagically into a EMF-based meta-model and API.\n\n- aimed at programmers who are familiar with EMF\n- API is generated automatically while the programer writes code in the editor\n- no *.genmodel files required\n- no *.ecore files required\n- just plain Xtend\n\nThis project is currently just a proof-of-concept.\nIt only covers a very small portion of EMF.\n\n## Currently supported:\n- `@XMFPackage` creates `EPackage` + `EFactory` classes\n- `@XMF` for classes of the meta model\n- inheritance using classes and abstract classes (currently no interfaces, but it will change soon)\n- `@Contained` for containment relation\n- `@Invariant` marks validation methods. XMF will automatically create the Validator class as necessary\n- Non-XMF datatypes are treated as attributes\n- XMF datatype is treated as a reference\n- `@DerivedAttribute` for attributes whose value is computed in a method\n- `List\u003cT\u003e` is treated as a attribute/reference of cardinality `0..*` and mapped to `EList\u003cT\u003e`\n- public methods are treated as `EOperations`\n- non-public method are ignored\n\n## Example meta model:\n\n```Xtend\n\n@XMFPackage(\"http://some/eNS_URI\")\n\n@XMF abstract class NamedEntity {\n\n\t@ID String name\n\t\n\t@Invariant(\"name must be smaller than 10 characters\")\n\tdef nameSizeConstraint() {\n\t\tname.length \u003c 10\n\t}\n\t\n\t@Invariant(\"name cannot be empty\")\n\tdef nameNotEmpty() {\n\t\t! name.empty\n\t}\n}\n\n@XMF class User extends NamedEntity {\n\tList\u003cString\u003e phones\n\t@OppositeOf(\"users\") Group group\n\t@Contained Account userAccount\n\t\n\tdef someOperation() {\n\t\t...\n\t}\n\t\n\tprivate def helperMethod() {\n\t\t...\n\t}\n}\n\n@XMF class Group extends NamedEntity {\n\t@Contained List\u003cUser\u003e users\n\t@DerivedAttribute def paidUsers() {\n\t\tusers.filter[salary \u003e 0]\n\t}\n}\n\n@XMF class Account {\n\tint salary = 0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsimko%2Fxmf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsimko%2Fxmf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsimko%2Fxmf/lists"}