{"id":21402603,"url":"https://github.com/caoccao/jaspiler","last_synced_at":"2025-07-13T22:31:54.289Z","repository":{"id":155726948,"uuid":"627698413","full_name":"caoccao/Jaspiler","owner":"caoccao","description":"Jaspiler is a Java to Java transpiler.","archived":false,"fork":false,"pushed_at":"2024-03-17T02:58:00.000Z","size":677,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T10:30:05.870Z","etag":null,"topics":["babel","java","plugins","transpile","transpiler"],"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/caoccao.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":"caocao","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":"caoccao","otechie":null,"custom":["https://paypal.me/caoccao?locale.x=en_US"]}},"created_at":"2023-04-14T02:27:29.000Z","updated_at":"2024-09-19T18:24:23.000Z","dependencies_parsed_at":"2024-04-11T22:02:51.259Z","dependency_job_id":"f38592ca-3322-42c1-8973-7a87d0b3e949","html_url":"https://github.com/caoccao/Jaspiler","commit_stats":{"total_commits":183,"total_committers":3,"mean_commits":61.0,"dds":"0.17486338797814205","last_synced_commit":"ae43bc3c604ec21f41156cd8c860039cad0e8468"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoccao%2FJaspiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoccao%2FJaspiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoccao%2FJaspiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoccao%2FJaspiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caoccao","download_url":"https://codeload.github.com/caoccao/Jaspiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225923370,"owners_count":17546052,"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":["babel","java","plugins","transpile","transpiler"],"created_at":"2024-11-22T15:39:28.628Z","updated_at":"2024-11-22T15:39:29.256Z","avatar_url":"https://github.com/caoccao.png","language":"Java","funding_links":["https://opencollective.com/caocao","https://issuehunt.io/r/caoccao","https://paypal.me/caoccao?locale.x=en_US"],"categories":[],"sub_categories":[],"readme":"Jaspiler\r\n========\r\n\r\n|Build Jaspiler|\r\n\r\n.. |Build Jaspiler| image:: https://github.com/caoccao/Jaspiler/actions/workflows/build_jaspiler_artifact.yml/badge.svg\r\n    :target: https://github.com/caoccao/Jaspiler/actions/workflows/build_jaspiler_artifact.yml\r\n\r\n`Jaspiler \u003chttps://github.com/caoccao/Jaspiler/\u003e`_ is a Java to Java transpiler. It transpiles the given Java code to the corresponding Java code with some customizations. It is expected to be a Babel for Java. If you like this project, please star it.\r\n\r\nMajor Features\r\n==============\r\n\r\n* Annotation based customizations\r\n* AST based customizations\r\n* JavaScript as the domain specific language (JS as DSL)\r\n* Babel flavored plugins\r\n* JDK 17 Support\r\n\r\nQuick Start\r\n===========\r\n\r\n* Download the all-in-one jar file ``Jaspiler-${version}.jar`` from the latest `Actions \u003chttps://github.com/caoccao/Jaspiler/actions\u003e`_.\r\n* Create a JavaScript file ``test.js`` as follows:\r\n\r\n.. code-block:: javascript\r\n\r\n    const result = jaspiler.transformSync(\r\n      `package com.test;\r\n      public class A {\r\n      }\r\n      `,\r\n      { \r\n        plugins: [{\r\n          visitor: {\r\n            Class(node) {\r\n              node.simpleName = jaspiler.createName('B');\r\n            },\r\n          },\r\n        }],\r\n        sourceType: 'string',\r\n      });\r\n    console.info(result.code);\r\n\r\n* Execute the command as follows:\r\n\r\n.. code-block:: shell\r\n\r\n    java -jar Jaspiler-${version}.jar test.js\r\n\r\n* The output is as follows:\r\n\r\n.. code-block:: java\r\n\r\n    package com.test;\r\n\r\n    public class B {\r\n    }\r\n\r\nDocument\r\n========\r\n\r\nThe complete document is at the `wiki \u003chttps://github.com/caoccao/Jaspiler/wiki\u003e`_.\r\n\r\nQ \u0026 A\r\n=====\r\n\r\nWhy do I Need a Java to Java Transpiler?\r\n----------------------------------------\r\n\r\n* I want to code with JDK 17 but support JDK 8/11. Jaspiler can help transform the code from JDK 17 to JDK 8/11.\r\n* I want to remove some proprietary cloud features at source code level before deploying the binaries to an on-premise environment to prevent the reverse engineering. Jaspiler can help add/update/remove any part of the code at the AST level.\r\n* I want to translate the Java code to JavaScript/Python/Go/.... Jaspiler can provide the complete AST and allow all kinds of translation.\r\n* I want to obfuscate the code. Jaspiler can help perform all kinds of code obfuscation at the AST level.\r\n\r\nWhat's the Status of Jaspiler?\r\n------------------------------\r\n\r\nJaspiler is at its early stage with limited feature set. You are welcome taking a try. Jaspiler is expected to be a community driven open-source project, so if you want a feature, either you raise an issue, wait for the community to prioritize it, or you submit a pull request.\r\n\r\nLicense\r\n=======\r\n\r\n`APACHE LICENSE, VERSION 2.0 \u003cLICENSE\u003e`_\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaoccao%2Fjaspiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaoccao%2Fjaspiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaoccao%2Fjaspiler/lists"}