{"id":15043192,"url":"https://github.com/ststeiger/procyon","last_synced_at":"2025-10-10T02:13:47.650Z","repository":{"id":59434167,"uuid":"45865052","full_name":"ststeiger/procyon","owner":"ststeiger","description":"Procyon java decompiler - Procyon is a binary star system in Canis Minor","archived":false,"fork":false,"pushed_at":"2021-05-27T06:49:59.000Z","size":1080,"stargazers_count":167,"open_issues_count":0,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T00:40:56.243Z","etag":null,"topics":["compiler-toolset","expression-tree","inspection","java-8","java-9","java-decompiler","procyon","reflection-framework"],"latest_commit_sha":null,"homepage":"https://github.com/mstrobel/procyon","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ststeiger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.Rtf","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T20:33:55.000Z","updated_at":"2025-03-11T18:40:13.000Z","dependencies_parsed_at":"2022-09-17T05:50:59.347Z","dependency_job_id":null,"html_url":"https://github.com/ststeiger/procyon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ststeiger%2Fprocyon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ststeiger%2Fprocyon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ststeiger%2Fprocyon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ststeiger%2Fprocyon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ststeiger","download_url":"https://codeload.github.com/ststeiger/procyon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"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":["compiler-toolset","expression-tree","inspection","java-8","java-9","java-decompiler","procyon","reflection-framework"],"created_at":"2024-09-24T20:48:41.074Z","updated_at":"2025-10-10T02:13:42.616Z","avatar_url":"https://github.com/ststeiger.png","language":"Java","readme":"![](https://bitbucket.org/mstrobel/procyon/wiki/logo.png)\r\n\r\n\r\n# This is an early [fork of Procyon from bitbucket](https://bitbucket.org/mstrobel/procyon). \r\nProcyon has since moved to [github](https://github.com/mstrobel/procyon). \r\n# For the latest version, please see https://github.com/mstrobel/procyon\r\n\r\n\r\n\r\n*Procyon* is a suite of Java metaprogramming tools focused on code generation and analysis.  It includes the following libraries:\r\n\r\n  1. Core Framework\r\n  2. Reflection Framework\r\n  3. Expressions Framework\r\n  4. Compiler Toolset (Experimental)\r\n  5. [Java Decompiler](https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler)\r\n\r\nThe Procyon libraries are available from **Maven Central** under group ID `org.bitbucket.mstrobel`.\r\n\r\n### Core Framework\r\n\r\nThe `procyon-core` framework contains common support classes used by the other Procyon APIs.  Its facilities include string manipulation, collection extensions, filesystem/path utilities, freezable objects and collections, attached data stores, and some runtime type helpers.\r\n\r\n### Reflection Framework\r\nThe `procyon-reflection` framework provides a rich reflection and code generation API with full support for generics, wildcards, and other high-level Java type concepts.  It is based on .NET's `System.Reflection` and `System.Reflection.Emit` APIs and is meant to address many of the shortcomings of the core Java reflection API, which offers rather limited and cumbersome support for generic type inspection.  Its code generation facilities include a `TypeBuilder`, `MethodBuilder`, and a bytecode emitter.\r\n\r\nFor more information, see the [Reflection Framework](https://bitbucket.org/mstrobel/procyon/wiki/Reflection%20Framework) topic.\r\n\r\n#### Example\r\n\r\n\t:::java\r\n    final Type\u003cMap\u003e map = Type.of(Map.class);\r\n    final Type\u003c?\u003e rawMap = map.getErasedType();\r\n    final Type\u003cMap\u003cString, Integer\u003e\u003e boundMap = map.makeGenericType(Types.String, Types.Integer);\r\n    \r\n    System.out.println(map.getDeclaredMethods().get(1));\r\n    System.out.println(rawMap.getDeclaredMethods().get(1));\r\n    System.out.println(boundMap.getDeclaredMethods().get(1));\r\n    \r\n    System.out.println(boundMap.getGenericTypeParameters());\r\n    System.out.println(boundMap.getTypeArguments());\r\n\r\n#### Output\r\n\r\n    :::text\r\n    public abstract V put(K, V)\r\n    public abstract Object put(Object, Object)\r\n    public abstract Integer put(String, Integer)\r\n    [K, V]\r\n    [java.lang.String, java.lang.Integer]\r\n\r\n### Expressions Framework\r\n\r\nThe `procyon-expressions` framework provides a more natural form of code generation.\r\nRather than requiring bytecode to be emitted directly, as with `procyon-reflection`\r\nand other popular libraries like ASM, `procyon-expressions` enables code composition\r\nusing declarative expression trees.  These expression trees may then be compiled directly\r\ninto callbacks or coupled with a `MethodBuilder`.  The `procyon-expressions` API is\r\nalmost a direct port of `System.Linq.Expressions` from .NET's Dynamic Language Runtime,\r\nminus the dynamic callsite support (and with more relaxed rules regarding type conversions).\r\n\r\n#### Example\r\n    :::java    \r\n    //\r\n    // This lambda closes over a complex constant (a String array).\r\n    //\r\n    \r\n    final ConstantExpression items = constant(\r\n        new String[] { \"one\", \"two\", \"three\", \"four\", \"five\" }\r\n    );\r\n\r\n    //\r\n    // If written in Java, the constructed expression would look something like this:\r\n    // \r\n    // () -\u003e {\r\n    //     for (String item : \u003cclosure\u003eitems)\r\n    //         System.out.printf(\"Got item: %s\\n\", item);\r\n    // }\r\n    //\r\n\r\n    final ParameterExpression item = variable(Types.String, \"item\");\r\n    \r\n    final LambdaExpression\u003cRunnable\u003e runnable = lambda(\r\n        Type.of(Runnable.class),\r\n        forEach(\r\n            item,\r\n            items,\r\n            call(\r\n                field(null, Types.System.getField(\"out\")),\r\n                \"printf\",\r\n                constant(\"Got item: %s\\n\"),\r\n                item\r\n            )\r\n        )\r\n    );\r\n    \r\n    System.out.println(runnable);\r\n    \r\n    final Runnable delegate = runnable.compile();\r\n\r\n    delegate.run();\r\n\r\n#### Output\r\n    :::text\r\n    () =\u003e for (String item : [one, two, three, four, five])\r\n        System.out.printf(\"Got item: %s\\n\", new Object[] { item })\r\n    \r\n    Got item: one\r\n    Got item: two\r\n    Got item: three\r\n    Got item: four\r\n    Got item: five\r\n\r\n### Compiler Toolset\r\n\r\nThe `procyon-compilertools` project is a work in progress that includes:\r\n\r\n  1. Class metadata and bytecode inspection/manipulation facilities based on `Mono.Cecil`\r\n  2. An optimization and decompiler framework based on `ILSpy`\r\n\r\nThe Compiler Toolset is still early in development and subject to change.\r\n\r\n### Decompiler Front-End\r\n\r\n`procyon-decompiler` is a standalone front-end for the Java decompiler included in\r\n`procyon-compilertools`.  All dependencies are embedded in the JAR for easy redistribution.\r\nFor more information about the decompiler, see the [Java Decompiler](https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler) wiki page.\r\n\r\n## Powered by Procyon\r\n\r\nCheck out these third party products based on Procyon!  Are you using Procyon in one of your projects?  Contact me ([email](mailto:mike.strobel@gmail.com) / [twitter](https://twitter.com/mstrobel)) if you would like it listed here. \r\n\r\n  - [SecureTeam Java Decompiler](http://www.secureteam.net/Java-Decompiler.aspx)   \r\n    A JavaFX-based decompiler front-end with fast and convenient code navigation.  Download it, or launch it directly from your browser.\r\n\r\n  - [Bytecode Viewer](https://github.com/Konloch/bytecode-viewer) is an open source Java decompilation, disassembly, and debugging suite by [@Konloch](https://twitter.com/Konloch).  It can produce decompiled sources from several modern Java decompilers, including Procyon, CFR, and FernFlower.\r\n","funding_links":[],"categories":["2. [↑](#-content) Pentesting"],"sub_categories":["2.3 [↑](#-content) Decompilers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fststeiger%2Fprocyon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fststeiger%2Fprocyon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fststeiger%2Fprocyon/lists"}