{"id":18370737,"url":"https://github.com/miho/vmf","last_synced_at":"2025-08-17T16:44:15.155Z","repository":{"id":46165382,"uuid":"140614715","full_name":"miho/VMF","owner":"miho","description":"VMF is a Lightweight Modeling Framework for the Java Platform (works on JDK 11-22)","archived":false,"fork":false,"pushed_at":"2025-01-23T14:05:22.000Z","size":2292,"stargazers_count":20,"open_issues_count":11,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-22T04:51:15.979Z","etag":null,"topics":["gradle","java","modeling","modeling-infrastructure"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miho.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-11T18:34:07.000Z","updated_at":"2025-01-23T14:05:25.000Z","dependencies_parsed_at":"2023-01-29T21:30:43.641Z","dependency_job_id":"42c64f7a-2d92-4f9e-8455-3e4046921619","html_url":"https://github.com/miho/VMF","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FVMF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FVMF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FVMF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FVMF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miho","download_url":"https://codeload.github.com/miho/VMF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247539066,"owners_count":20955233,"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":["gradle","java","modeling","modeling-infrastructure"],"created_at":"2024-11-05T23:40:04.709Z","updated_at":"2025-08-17T16:44:15.126Z","avatar_url":"https://github.com/miho.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"VMF\n=======\n\n[![Javadocs](https://www.javadoc.io/badge/eu.mihosoft.vmf/vmf.svg?color=blue\u0026label=javadoc-core)](https://www.javadoc.io/doc/eu.mihosoft.vmf/vmf) [![Javadocs](https://www.javadoc.io/badge/eu.mihosoft.vmf/vmf-runtime.svg?color=blue\u0026label=javadoc-runtime)](https://www.javadoc.io/doc/eu.mihosoft.vmf/vmf-runtime) [![Javadocs](https://www.javadoc.io/badge/eu.mihosoft.vmf/vmf-jackson.svg?color=blue\u0026label=javadoc-jackson)](https://www.javadoc.io/doc/eu.mihosoft.vmf/vmf-jackson)\n![VMF CI](https://github.com/miho/VMF/workflows/VMF%20CI/badge.svg)\n[![Join the chat at https://gitter.im/VMF_/Lobby](https://badges.gitter.im/VMF_/Lobby.svg)](https://gitter.im/VMF_/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\u003ca href=\"https://foojay.io/today/works-with-openjdk\"\u003e\n   \u003cimg align=\"right\" \n        src=\"https://github.com/foojayio/badges/raw/main/works_with_openjdk/Works-with-OpenJDK.png\"   \n        width=\"100\"\u003e\n\u003c/a\u003e\n\n\u003cbr\u003e\n\n\nVMF is a lightweight modeling framework. It conveniently translates annotated Java interfaces into powerful implementations. It writes all the inevitable but boring boilerplate code for you and provides a modern and stable API. It is designed to work with the newest versions of Java as soon as they are released. It works well with Java 11-24.\nIt generates/supports:\n\n- getters and setters\n- default values\n- containment\n- builder API\n- equals() and hashCode()\n- deep and shallow cloning\n- change notification\n- undo/redo\n- object graph traversal API via iterators and streams\n- immutable types and read-only wrappers\n- delegation\n- annotations\n- reflection\n- jackson serialization support (json, xml, yml)\n- json schema generation for validation and automatic visual editor generation\n- ...\n\nA VMF model consists of annotated Java interfaces. We could call this \"wannabe\" code. Just specify the interface and its properties and get a fully functional  implementation including property setters and getters, builders, iterators, and much more. Even for a simple model VMF provides a lot of useful APIs:\n\n\u003cimg src=\"resources/img/vmf-01.svg\"\u003e\n\n## Using VMF\n\nCheckout the tutorial projects: https://github.com/miho/VMF-Tutorials\n\nVMF comes with excellent Gradle support. Just add the plugin like so (get the latest version [here](https://plugins.gradle.org/plugin/eu.mihosoft.vmf)):\n\n```gradle\nplugins {\n  id \"eu.mihosoft.vmf\" version \"0.2.9.4\" // use latest version\n}\n```\n\nNow just add the model definitions to the VMF source folder, e.g., `src/main/vmf/`. The package name must end with `.vmfmodel`, for example:\n\n```java\npackage eu.mihosoft.vmf.tutorial.vmfmodel;\n\nimport eu.mihosoft.vmf.core.Container;\nimport eu.mihosoft.vmf.core.Contains;\n\ninterface Parent {\n\n    @Contains(opposite = \"parent\")\n    Child[] getChildren();\n\n    String getName();\n}\n\ninterface Child {\n    @Container(opposite=\"children\")\n    Parent getParent();\n    \n    int getValue();\n}\n```\n\nJust call the `vmfGenModelSources` task to generate the implementation.\n\nTo improve IDE support, enable the IntelliJ support via\n\n```\nbuildscript {\n  ext.vmfPluginIntelliJIntegration = true\n}\n```\n\n## Building VMF (Core, Runtime and Plugin)\n\n### Requirements\n\n- Java \u003e= 11\n- Internet connection (dependencies are downloaded automatically)\n- IDE: [Gradle](http://www.gradle.org/) Plugin (not necessary for command line usage)\n\n### IDE\n\nOpen the `VMF` [Gradle](http://www.gradle.org/) project in your favourite IDE (tested with IntelliJ 2024) and build it\nby executing the `publishToMavenLocal` task.\n\n### Command Line\n\nNavigate to the `VMF`[Gradle](http://www.gradle.org/) project (i.e., `path/to/VMF/`) and enter the following command\n\n#### Bash (Linux/macOS/Cygwin/other Unix shell)\n\n    bash gradlew publishToMavenLocal\n    \n#### Windows (CMD)\n\n    gradlew publishToMavenLocal\n    \n\u003e **NOTE:** to execute the tests within the VMF project (basic tests) execute the `test` task after executing `publishToMavenLocal`.    \n    \n    \n## Testing VMF (Core, Runtime \u0026 Plugin)\n\nTo execute the full test suite, navigate to the test project (i.e., `path/to/VMF/test-suite`) and enter the following command\n\n#### Bash (Linux/macOS/Cygwin/other Unix shell)\n\n    bash gradlew test\n    \n#### Windows (CMD)\n\n    gradlew test\n\nThis will use the latest snapshot vmf and gradle-plugin to execute the tests defined in the test-suite project.\n\n### Viewing the Report\n\nAn HTML version of the test report is located in the build folder `test-suite/build/reports/tests/test/index.html`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiho%2Fvmf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiho%2Fvmf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiho%2Fvmf/lists"}