{"id":19017475,"url":"https://github.com/junkdog/agrotera","last_synced_at":"2026-03-16T14:04:06.974Z","repository":{"id":7572438,"uuid":"8926895","full_name":"junkdog/agrotera","owner":"junkdog","description":"Anti-boilerplate strategies for Artemis Entity System Framework.","archived":false,"fork":false,"pushed_at":"2014-05-08T00:03:47.000Z","size":2478,"stargazers_count":7,"open_issues_count":6,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-17T18:23:47.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junkdog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-21T11:00:14.000Z","updated_at":"2021-10-10T14:11:42.000Z","dependencies_parsed_at":"2022-08-25T22:40:52.975Z","dependency_job_id":null,"html_url":"https://github.com/junkdog/agrotera","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fagrotera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fagrotera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fagrotera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fagrotera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junkdog","download_url":"https://codeload.github.com/junkdog/agrotera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360248,"owners_count":21417717,"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-11-08T19:47:08.924Z","updated_at":"2026-03-16T14:04:06.939Z","avatar_url":"https://github.com/junkdog.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agrotera\n\nZero-overhead anti-boilerplate strategies for [Artemis Entity System Framework][01].\n\n# Nota Bene: RIP agrotera\n\nAgrotera probably won't see much future development; a lot of the functionality provided by\nagrotera is now present in [artemis-odb](https://github.com/junkdog/artemis-odb). Refer to\n[this post](https://groups.google.com/forum/#!topic/artemis-odb/ESuG3hDAVsY) for more details.\n\n\n## Features\n- Compile-time class engineering: no reflection overhead, no extra classes, no additional\n  runtime dependencies, works with Android.\n- [@ArtemisSystem][11] for EntitySystems and [@ArtemisManager][12] for Managers.\n  - Injects `Aspect` in constructor, unless already defined (only applies to EntitySystems).\n  - Declares fields for referenced component mappers, managers and systems (only tested with Eclipse and maven).\n  - Wires up referenced classes in `initialize()`, prepending to the method if already defined.\n  - Generate *Component Dependency Matrices* via maven plugin ([example][14]).\n- [@Profile][13] EntitySystems\n  - Injects conditional profiler call at start of `begin()` and before any exit point in `end()`.\n  - User-specified profiler class - adhering to [ArtemisProfiler][15].\n- Inject abitrary classes with [@ArtemisInjected][16].\n  - Creates an `initialize(World)` method on the annotated class.\n\n\n## Installation\n\n\n- [Preparing Eclipse IDE](http://github.com/junkdog/agrotera/wiki/Eclipse-IDE-Installation): \n  Add lombok-pg and agrotera-lombok to `eclipse.ini`.\n- [Eclipse project setup](http://github.com/junkdog/agrotera/wiki/Eclipse-Project-Setup):\n  Add lombok-pg to classpath and `agrotera-asm` as a project builder. _Not necessary_ when using Eclipse+Maven.\n- [Maven project setup](http://github.com/junkdog/agrotera/wiki/Maven-Project-Setup):\n  Configure `agrotera-maven-plugin`. Also applies to Eclipse+Maven.\n\n\n## Minimal example\n###What you type:\n```java\n@Profile(using=Profiler.class, enabled=true)\n@ArtemisSystem(\n    requires={Renderable.class, Velocity.class},\n\texcludes={Cullable.class, AssetReference.class},\n\tmanagers={TagManager.class, GroupManager.class},\n\tsystems=VelocitySystem.class)\npublic class TestSystem extends IntervalEntityProcessingSystem\n{\n\tpublic TestSystem()\n\t{\n\t\tsuper(null, 0.05f);\n\t}\n\t\n\t@Override\n\tprotected void process(Entity e)\n\t{\n\t\t// process system\n\t}\n}\n```\n###What the JVM gets:\n```java\n@WovenByTheHuntress // marker annotation; don't process class when present\n@Profile(using=Profiler.class, enabled=true)\n@ArtemisSystem(\n    requires={Renderable.class, Velocity.class},\n\texcludes={Cullable.class, AssetReference.class},\n\tmanagers={TagManager.class, GroupManager.class},\n\tsystems=VelocitySystem.class)\npublic class TestSystem extends IntervalEntityProcessingSystem\n{\n\tprivate final Profiler $profiler;\n\tprivate ComponentMapper\u003cRenderable\u003e renderableMapper;\n\tprivate ComponentMapper\u003cVelocity\u003e velocityMapper;\n\tprivate VelocitySystem velocitySystem;\n\tprivate TagManager tagManager;\n\tprivate GroupManager groupManager;\n\n\tpublic TestSystem()\n\t{\n\t\tsuper(Aspect.getAspectForAll(Renderable.class, Velocity.class)\n\t\t\t.exclude(Cullable.class, AssetReference.class), 0.05f);\n\t\t$profiler = new Profiler();\n\t\t$profiler.setTag(getClass());\n\t}\n\n\t@Override\n\tprotected void initialize()\n\t{\n\t\trenderableMapper = world.getMapper(Renderable.class);\n\t\tvelocityMapper = world.getMapper(Velocity.class);\n\t\ttagManager = world.getManager(TagManager.class);\n\t\tgroupManager = world.getManager(GroupManager.class);\n\t\tvelocitySystem = world.getSystem(VelocitySystem.class);\n\t}\n\n\t@Override\n\tprotected void begin()\n\t{\n\t\t$profiler.start();\n\t}\n\n\t@Override\n\tprotected void end()\n\t{\n\t\t$profiler.stop();\n\t}\n\n\t@Override\n\tprotected void process(Entity e)\n\t{\n\t\t// process system\n\t}\n}\n```\n\n# Behind the veil\nAgrotera consists of two intermingling parts.\n\n### agrotera-lombok\nResponsible for declaring the fields, inferred from annotations,\nensuring that the IDE doesn't complain about unresolved fields.\n\nProvides `@Profiler`, `@ArtemisSystem`, `@ArtemisManager` and `@ArtemisInjected`, processed\nalongside [lombok-pg][41] (you know, that fork of [Project Lombok][42] - because I couldn't\nget type resolution working under vanilla lombok).\n\n\n### agrotera-asm\nTransforms the entity systems and managers; wiring up dependencies and\ninjecting profiler calls. Conceived as a post-compile step run via the\nagrotera-maven-plugin or with an eclipse builder.\n\n## Artemis Maven dependency / Shameless self-promotion\nOur [fork][61] of Artemis:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003enet.onedaybeard.artemis\u003c/groupId\u003e\n    \u003cartifactId\u003eartemis-odb\u003c/artifactId\u003e\n    \u003cversion\u003e0.5.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Contact\njunkdog at onedaybeard dot net - twitter: [@junkdogAP](http://twitter.com/junkdogAP)\n\n [01]: http://gamadu.com/artemis/\n [11]: https://github.com/junkdog/agrotera/wiki/@ArtemisSystem\n [12]: https://github.com/junkdog/agrotera/wiki/@ArtemisManager\n [13]: https://github.com/junkdog/agrotera/wiki/@Profile\n [14]: http://junkdog.github.io/matrix.html\n [15]: https://github.com/junkdog/agrotera/blob/master/agrotera-api/src/main/java/net/onedaybeard/agrotera/ArtemisProfiler.java\n [16]: https://github.com/junkdog/agrotera/wiki/@ArtemisInjected\n [41]: https://github.com/peichhorn/lombok-pg\n [42]: http://projectlombok.org/\n [61]: https://github.com/junkdog/artemis-odb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fagrotera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunkdog%2Fagrotera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fagrotera/lists"}