{"id":47662396,"url":"https://github.com/cvs0/bytecode-processor","last_synced_at":"2026-04-02T11:39:52.055Z","repository":{"id":301269221,"uuid":"1008684033","full_name":"cvs0/bytecode-processor","owner":"cvs0","description":"Advanced bytecode processing library","archived":false,"fork":false,"pushed_at":"2026-03-24T00:28:22.000Z","size":150,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T00:46:49.356Z","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/cvs0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-25T23:58:32.000Z","updated_at":"2026-03-23T05:06:42.000Z","dependencies_parsed_at":"2025-06-26T02:35:00.953Z","dependency_job_id":"2c9ed2a2-040a-4740-bfbf-102870e4d8a6","html_url":"https://github.com/cvs0/bytecode-processor","commit_stats":null,"previous_names":["cvs0/bytecode-processor"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cvs0/bytecode-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvs0%2Fbytecode-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvs0%2Fbytecode-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvs0%2Fbytecode-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvs0%2Fbytecode-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvs0","download_url":"https://codeload.github.com/cvs0/bytecode-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvs0%2Fbytecode-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"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":[],"created_at":"2026-04-02T11:39:51.470Z","updated_at":"2026-04-02T11:39:52.047Z","avatar_url":"https://github.com/cvs0.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bytecode Processor\n\nJava bytecode analysis and transformation on ASM’s tree API. Model a JAR as editable program classes and resources, analyze dependencies, and run coordinated rewrites (renames, descriptors, instructions, resources) through one `ClassTransformer` pipeline.\n\n**Stack:** ASM `ClassNode` / `ProgramClass` model → `DependencyAnalyzer` and utilities → `ClassTransformer` + optional `Plugin`s. CLI is Picocli, shipped as a shaded JAR.\n\n## Features\n\n- Dependency graphs, cycles, reverse dependents, Graphviz DOT export\n- Renames (class, method, field), package moves, instruction/LDC hooks, optional debug stripping\n- Ordered plugins with `java.util.logging` diagnostics\n- Picocli CLI for JAR analysis without embedding the library in your own code\n\n## Requirements\n\nJDK **21+** and Maven **3.6.3+** (enforced in the POM).\n\n## Quick start\n\n```bash\ngit clone https://github.com/cvs0/bytecode-processor.git\ncd bytecode-processor\nmvn clean verify\n```\n\nArtifacts in `target/` after `package` / `verify`:\n\n| Output | Purpose |\n|--------|---------|\n| `bytecode-processor-${revision}.jar` | Library (`module bytecode.processor`). Does **not** bundle ASM or Picocli. |\n| `bytecode-processor-${revision}-all.jar` | Runnable CLI (shaded). Use `java -jar …`. |\n\n`${revision}` comes from `pom.xml` and is resolved at build time (flatten plugin).\n\n### Maven dependency\n\nReleases are on **Maven Central**. Replace `VERSION` with the latest release (see [Central](https://central.sonatype.com/) or repo tags).\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.cvs0\u003c/groupId\u003e\n    \u003cartifactId\u003ebytecode-processor\u003c/artifactId\u003e\n    \u003cversion\u003eVERSION\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**Shaded CLI** as a classified artifact:\n\n```xml\n\u003cclassifier\u003eall\u003c/classifier\u003e\n```\n\n**Snapshots** (e.g. `1.2.3-SNAPSHOT`) are published to [GitHub Packages](https://github.com/cvs0/bytecode-processor/packages) on pushes to `development`. Add the `https://maven.pkg.github.com/cvs0/bytecode-processor` repository and authenticate as [GitHub documents for Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).\n\n### IDE / modules\n\nThe project uses **Lombok** (`provided`). Install the [Lombok IDE support](https://projectlombok.org/setup/) for navigation.\n\nConsumers need ASM on the module or classpath. The library `requires org.objectweb.asm.tree`, `java.logging`, and `info.picocli` (for the non-exported CLI package). Exported packages are listed in [`module-info.java`](src/main/java/module-info.java); `io.github.cvs0.bytecode.cli` is opened to Picocli only.\n\n## Using the library\n\n**Naming:** internal names use JVM slash form (`com/example/Foo`, inner classes `Outer$Inner`). Method rename keys are `className + \".\" + name + descriptor` (raw descriptor, e.g. `(I)V`). `renamePackage` accepts internal or dot prefixes.\n\n**Typical flow:**\n\n1. `JarMapping.fromJar(path)` — load classes and resources.\n2. Analyze or inspect (`DependencyAnalyzer`, `JarStatistics`, etc.).\n3. `ClassTransformer(mapping)` — queue changes, then **`applyTransformations()`** once.\n4. `mapping.writeToJar(path)` — write the JAR.\n\n**Details** (apply order, manifest/resource behavior, thread safety): see Javadoc on `ClassTransformer`, `JarWriter`, and `JarMapping`.\n\n**Plugins:** implement `Plugin` (`initialize`, `process(JarMapping)`, `cleanup`, optional priority). Register with `PluginManager`. Reference configs live under `io.github.cvs0.bytecode.plugin.impl` (`OptimizationPlugin`, `ObfuscationPlugin`).\n\n## CLI\n\n```bash\njava -jar target/bytecode-processor-*-all.jar [COMMAND] [ARGS]\n```\n\nGlobal options: `-h` / `--help`, `-V` / `--version`. Without a subcommand, usage is printed.\n\n| Command | What it does |\n|---------|----------------|\n| `analyze \u003cjar\u003e` | Full textual report (`JarAnalyzer`-style). Exit `2` if path is not a file. |\n| `stats \u003cjar\u003e` | Aggregates; add `--json` for one-line stats. Exit `2` if missing. |\n| `deps \u003cjar\u003e` | Dependency summary; `--dot \u003cpath\u003e` for DOT; `--class \u003cinternalName\u003e` for dependents (up to 50). Exit `2` if missing. |\n\n## Development\n\n```bash\nmvn verify    # tests + integration (shaded CLI) + JaCoCo + enforcer\nmvn test      # unit tests only\nmvn package   # library + shaded JAR\n```\n\nCoverage: `target/site/*/index.html` after `verify`.\n\n**CI** ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)): `mvn -B verify` on pushes/PRs to `main`, `master`, `develop`, `development`, and `release/**`. Tags `v*` attach both JARs to a GitHub Release.\n\n**Publish** ([`.github/workflows/publish.yml`](.github/workflows/publish.yml)): tag `v*` → Maven Central; push to `development` → snapshot to GitHub Packages.\n\n**Optional git hooks:** `git config core.hooksPath .githooks` (on Unix, `chmod +x .githooks/pre-commit`). Pre-commit runs `mvn test`.\n\n**Contributing:** `mvn verify` green; keep changes focused; match existing style ([`.editorconfig`](.editorconfig)). Version is `${revision}` in the POM (flattened); release tags should match the published version.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvs0%2Fbytecode-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvs0%2Fbytecode-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvs0%2Fbytecode-processor/lists"}