{"id":36420857,"url":"https://github.com/mohamed-ashraf-bayor/jisel","last_synced_at":"2026-01-11T17:34:44.645Z","repository":{"id":44135094,"uuid":"433109615","full_name":"mohamed-ashraf-bayor/jisel","owner":"mohamed-ashraf-bayor","description":"Java Interface Segregation Library (min. Java 17 required)","archived":false,"fork":false,"pushed_at":"2025-03-07T13:00:58.000Z","size":372,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T04:34:49.016Z","etag":null,"topics":["addto","annotation","annotations","code-generation","code-generator","developer-tool","interface-segregation-principle","isp","java","java-17","java17","jisel","mohamed-ashraf-bayor","sealed-interface","sealfor","software-design","solid-principles","toplevel"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mohamed-ashraf-bayor.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":"2021-11-29T16:07:27.000Z","updated_at":"2023-10-15T03:12:16.000Z","dependencies_parsed_at":"2023-02-01T01:00:37.982Z","dependency_job_id":null,"html_url":"https://github.com/mohamed-ashraf-bayor/jisel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mohamed-ashraf-bayor/jisel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-ashraf-bayor%2Fjisel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-ashraf-bayor%2Fjisel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-ashraf-bayor%2Fjisel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-ashraf-bayor%2Fjisel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamed-ashraf-bayor","download_url":"https://codeload.github.com/mohamed-ashraf-bayor/jisel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-ashraf-bayor%2Fjisel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28315879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["addto","annotation","annotations","code-generation","code-generator","developer-tool","interface-segregation-principle","isp","java","java-17","java17","jisel","mohamed-ashraf-bayor","sealed-interface","sealfor","software-design","solid-principles","toplevel"],"created_at":"2026-01-11T17:34:43.959Z","updated_at":"2026-01-11T17:34:44.634Z","avatar_url":"https://github.com/mohamed-ashraf-bayor.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JISEL - Java Interface Segregation Library\n\n\n\u003e ### JISEL 1.2 released:\n\u003e - Added new annotations (**@UnSeal**, **@Detach** and **@DetachAll**) allowing to generate pre-java 17 \"unsealed\" interfaces during the Segregation process\n\u003e - Existing Annotations on top of interfaces, methods or parameters are now replicated in the generated interfaces or classes \n\u003e - Bug fixes and improvements\n\n\n\u003cbr\u003e\n\n## Quick Overview\n\nCode Migration to Java 17 using FROPOREC and JISEL - [https://youtu.be/iML8EjMIDLc](https://youtu.be/iML8EjMIDLc)\n\nIntegrating Jisel with Spring: Segregation of a Spring Data JPA Repository - [PDF](https://github.com/mohamed-ashraf-bayor/jisel-integration-with-spring/blob/master/Jisel_Integration_with_SpringDataJPA.pdf)\n\nv1.2: UnSeal \u0026 Detach - [https://youtu.be/HOssFTKPQRM](https://youtu.be/HOssFTKPQRM)\n\nv1.1 Quick Intro - [https://youtu.be/cbYdt8NRUaM](https://youtu.be/cbYdt8NRUaM)\n\nProject's Pitch (v1.0) - [https://youtu.be/nkbu6zxV3R0](https://youtu.be/nkbu6zxV3R0)\n\n\n\u003cbr\u003e\n\n## Installation\n\nIf you are running a Maven project, add the latest release dependency to your pom.xml\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.jisel\u003c/groupId\u003e\n    \u003cartifactId\u003ejisel\u003c/artifactId\u003e\n    \u003cversion\u003e1.2\u003c/version\u003e\n\u003c/dependency\u003e\n``` \nYou will also need to include the same dependency as an additional annotation processor in the Maven Compiler plugin of your project\n```xml\n    \u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e${maven-compiler-plugin.version}\u003c/version\u003e\n                \u003cconfiguration\u003e\n                    \u003crelease\u003e17\u003c/release\u003e\n                    \u003ccompilerArgs\u003e-Xlint:unchecked\u003c/compilerArgs\u003e\n                    \u003cannotationProcessorPaths\u003e\n                        \u003cpath\u003e\n                            \u003cgroupId\u003eorg.jisel\u003c/groupId\u003e\n                            \u003cartifactId\u003ejisel\u003c/artifactId\u003e\n                            \u003cversion\u003e1.2\u003c/version\u003e\n                        \u003c/path\u003e\n                    \u003c/annotationProcessorPaths\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n```\n\nFor other build tools, please check: [Maven Central](https://search.maven.org/artifact/org.jisel/jisel/1.2/jar).\n\n\n\u003cbr\u003e\n\n## Provided Annotations\n\n### @TopLevel\n- **MANDATORY** annotation, to be applied only on top of abstract methods of the large interface you intend to segregate.\u003cbr\u003e\n- Allows you to specify methods which should be part of the top-level parent interface generated during segregation.\u003cbr\u003e\n- As a result, a sealed interface will be generated following the naming convention:\n  **Sealed\u0026#60;LargeInterfaceSimpleName\u0026#62;** (**\u0026#60;LargeInterfaceSimpleName\u0026#62;** corresponds to the simplename of the interface being segregated).\u003cbr\u003e\n- The generated sealed interface will contain all abstract methods annotated with **\u0026#64;TopLevel**.\u003cbr\u003e\n- Also, any other Jisel annotation combined with **\u0026#64;TopLevel** on the same abstract method, will be ignored in the processing.\n\n### @SealFor\n- Annotation to be applied only on top of abstract methods of an interface you intend to segregate.\u003cbr\u003e\n- Picked up and processed **ONLY** if at least 1 of the abstract methods of the large interface has been annotated with **\u0026#64;TopLevel**.\u003cbr\u003e\n- Ignored if combined with **\u0026#64;TopLevel** on the same abstract method.\u003cbr\u003e\n- Expects an array of String values corresponding to the list of profiles you want to seal the method for.\u003cbr\u003e\n- For each one of the specified profile names, a sealed interface will be generated following the naming convention **Sealed\u0026#60;ProfileName\u0026#62;\u0026#60;LargeInterfaceSimpleName\u0026#62;**(**\u0026#60;LargeInterfaceSimpleName\u0026#62;** corresponds to the simplename of the interface being segregated).\n```java\npublic interface Sociable {\n\n    String STUDENT = \"Student\";\n    String WORKER = \"Worker\";\n    String ACTIVE_WORKER = \"ActiveWorker\";\n\n    @TopLevel\n    String startConversation() throws IllegalStateException;\n\n    @SealFor(STUDENT)\n    boolean attendClass(String fieldOfStudy) throws IllegalArgumentException;\n\n    @SealFor(STUDENT)\n    void askForHelpWhenNeeded();\n\n    @SealFor({WORKER, ACTIVE_WORKER})\n    boolean[] joinOfficeSocialGroups(String[] groups, int maximum);\n\n    @SealFor(ACTIVE_WORKER)\n    void leadOfficeSocialGroup(String groupName);\n\n    @SealFor(ACTIVE_WORKER)\n    double createNewOfficeSocialGroup(String groupName, List\u003cString\u003e starters) throws ArithmeticException;\n}\n```\n\n### @AddTo\nAnnotation to be applied on top of a class, interface or record, which is implementing or extending a sealed interface generated by Jisel.\u003cbr\u003e\nExpects 2 attributes:\n- **profiles**: OPTIONAL - array of String values corresponding to the list of profiles whose generated sealed interfaces are implemented by the annotated class, interface or record.\u003cbr\u003e\n  If not provided or empty, the annotated class, interface or record will be added to the permits list of the generated top-level parent sealed interface.\u003cbr\u003e\n- **largeInterface**: **MANDATORY** - _.class_ representation of the large interface. That would be the **\u0026#60;LargeInterfaceSimpleName\u0026#62;** as seen in the sealed interface name convention, followed by \"_.class_\".\u003cbr\u003e\n```java\n@AddTo(profiles = {STUDENT, WORKER}, largeInterface = Sociable.class)\npublic final class StudentWorkerHybrid implements SealedStudentSociable, SealedWorkerSociable {\n    @Override\n    public String startConversation() throws IllegalStateException {\n        return null;\n    }\n\n    @Override\n    public void askForHelpWhenNeeded() {\n    }\n\n    @Override\n    public boolean attendClass(String param0) throws IllegalArgumentException {\n        return false;\n    }\n\n    @Override\n    public boolean[] joinOfficeSocialGroups(String[] param0, int param1) {\n        return new boolean[0];\n    }\n}\n```\n\n\u003cbr\u003e\n\n### @UnSeal\nAnnotation to be applied only on top of large interfaces to segregate. \u003cbr\u003e\nGenerates a classic pre-java 17 interfaces hierarchy, which is basically the Interface Segregation Principle applied without sealing the hierarchy. \u003cbr\u003e\nThe unsealed hierarchy interfaces are generated additionally to the sealed hierarchy generated files, and stored in the created _unsealed_ sub-package. Each one of the generated interfaces follows the naming convention: \u003cProfileName\u003e\u003cLargeInterfaceSimpleName\u003e (\u003cLargeInterfaceSimpleName\u003e is the simplename of the large interface being segregated).\u003cbr\u003e\n**Note:** This annotation will not work if **\u0026#64;TopLevel** is NOT used anywhere within the large interface.\n\u003cbr\u003e\n\n```java\n@UnSeal\npublic interface Sociable {\n\n  String STUDENT = \"Student\";\n\n  @TopLevel\n  String startConversation() throws IllegalStateException;\n\n  @SealFor(STUDENT)\n  boolean attendClass(String fieldOfStudy) throws IllegalArgumentException;\n  ...\n}\n```\n\n\u003cbr\u003e\n\n### @Detach\nRepeatable annotation to apply on top of a large interface being segregated. \u003cbr\u003e\nExpects a mandatory **profile** attribute String value corresponding to one of the profiles provided using the **\u0026#64;SealFor** annotation. \u003cbr\u003e\nResult will be the generation of an (unsealed) interface for the specified profile. The generated interface contains all abstract methods which have been tagged for the specified profile (through the use of **\u0026#64;SealFor**).\u003cbr\u003e\nAlso, as the generated interface is \"detached\" from the generated sealed hierarchy, no inheritance declaration clause (_extends_) is generated. \u003cbr\u003e\nFlexibility is offered, allowing to choose a new name for the generated interface, specify which superInterfaces (along with generics) the generated interface should extend, and list qualified names of annotations (along with their attributes/values) to be added on top of the generated interface. \u003cbr\u003e\nAll generated detached interfaces are stored in the created _detached_ sub-package.\u003cbr\u003e\n**Note:** This annotation will not work if **\u0026#64;TopLevel** is NOT used anywhere within the large interface, or if the specified profile is none of the ones provided though the **\u0026#64;SealFor** annotation.\n\n```java\n@Detach(\n        profile = ACTIVE_WORKER,\n        rename = ACTIVE_WORKER + \"With2SuperInterfaces\",\n        superInterfaces = {Processor.class, Drivable.class},\n        applyAnnotations = \"\"\"\n                @java.lang.Deprecated\n                @java.lang.SuppressWarnings({\"unchecked\", \"deprecation\", \"unused\", \"testing\", \"anotherTestValue\"})\n                @javax.annotation.processing.SupportedOptions(\"\")\n                @javax.annotation.processing.SupportedAnnotationTypes(\"type1\")\n                \"\"\"\n)\n@Detach(profile = STUDENT, rename = \"DeprecatedStudent\", applyAnnotations = \"@java.lang.Deprecated\")\npublic interface Sociable {\n\n  String STUDENT = \"Student\";\n  String WORKER = \"Worker\";\n  String ACTIVE_WORKER = \"ActiveWorker\";\n  \n  @TopLevel\n  String startConversation() throws IllegalStateException;\n\n  @SealFor(STUDENT)\n  boolean attendClass(String fieldOfStudy) throws IllegalArgumentException;\n  \n  ...\n}\n```\n\n\u003cbr\u003e\n\n### @DetachAll\nAnnotation to apply on top of a large interface being segregated. \u003cbr\u003e\nResult will be the generation of (unsealed) interfaces generated, each one corresponding to each profile provided through the use of the **\u0026#64;SealFor** annotation. Also, each generated interface contains all tagged abstract methods for each profile. \u003cbr\u003e\nDoes not provide as much flexibility as the **\u0026#64;Detach** annotation. \u003cbr\u003e\nAll generated detached interfaces are stored in the created _detached.all_ sub-package.\n**Note:** This annotation will not work if **\u0026#64;TopLevel** is NOT used anywhere within the large interface.\n\n```java\n@DetachAll\npublic interface Sociable {\n\n  String STUDENT = \"Student\";\n  String WORKER = \"Worker\";\n  String ACTIVE_WORKER = \"ActiveWorker\";\n\n  @TopLevel\n  String startConversation() throws IllegalStateException;\n\n  @SealFor(STUDENT)\n  boolean attendClass(String fieldOfStudy) throws IllegalArgumentException;\n  \n  ...\n}\n```\n\n\u003cbr\u003e\n\n### Sample interfaces and classes for testing\n[https://github.com/mohamed-ashraf-bayor/jisel-annotation-client](https://github.com/mohamed-ashraf-bayor/jisel-annotation-client)\n\n### Integration with Spring Framework / Spring Boot\n[https://github.com/mohamed-ashraf-bayor/jisel-integration-with-spring](https://github.com/mohamed-ashraf-bayor/jisel-integration-with-spring)\n\n### Issues, Bugs, Suggestions\nContribute to the project's growth by reporting issues or making improvement suggestions [here](https://github.com/mohamed-ashraf-bayor/jisel/issues/new/choose)\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-ashraf-bayor%2Fjisel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamed-ashraf-bayor%2Fjisel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-ashraf-bayor%2Fjisel/lists"}