{"id":26194604,"url":"https://github.com/col-e/sourcesolver","last_synced_at":"2025-04-15T03:15:10.589Z","repository":{"id":270164851,"uuid":"893365912","full_name":"Col-E/SourceSolver","owner":"Col-E","description":"A lightweight wrapper on the javac API to support resolving class and member references in a String of Java source code.","archived":false,"fork":false,"pushed_at":"2025-04-09T00:37:57.000Z","size":654,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T03:15:05.146Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Col-E.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T08:47:02.000Z","updated_at":"2025-04-09T00:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"feaf15ee-17ce-42fe-97a2-c99f37dceb00","html_url":"https://github.com/Col-E/SourceSolver","commit_stats":null,"previous_names":["col-e/sourcesolver"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Col-E%2FSourceSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Col-E%2FSourceSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Col-E%2FSourceSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Col-E%2FSourceSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Col-E","download_url":"https://codeload.github.com/Col-E/SourceSolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997080,"owners_count":21195799,"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":"2025-03-12T01:58:13.020Z","updated_at":"2025-04-15T03:15:10.554Z","avatar_url":"https://github.com/Col-E.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Source-Solver\n\nA lightweight wrapper on the `javac` API to support resolving class and member references in a `String` of Java source code.\n\n## Example use\n\n```java\n// Provide some Java source code\nString sourceCode = Files.readString(Paths.get(\"Checkbox.java\"));\nint index = sourceCode.indexOf(\"void processItemEvent(\") + 15;\n\n// Create a parser and parse the source into the Source-Solver model\nParser parser = new Parser();\nCompilationUnitModel model = parser.parse(sourceCode);\n\n// Create an entry-pool which provides information about class structures to Source-Solver.\n// You are expected to provide your own ClassEntry instances into the pool.\n// You can find an example of how to do this in the test classes of this repository.\nEntryPool pool = new BasicEntryPool();\nloadClassesIntoPool(pool);\n\n// Create a resolver targeting the given compilation unit and resolve at some index\n// into the 'sourceCode' string.\nResolver resolver = new BasicResolver(model, pool);\nResolution resolution = resolver.resolveAt(index);\n\n// Check for an instance of the expected resolution type to get more information about the resolved\n// class or member reference at the given index.\nif (resolution instanceof MethodResolution methodResolution) { ... }\n```\n\n## Requirements\n\nYou will need to provide access to the following modules when using this library:\n\n```\njdk.compiler/com.sun.tools.javac.parser\njdk.compiler/com.sun.tools.javac.tree\njdk.compiler/com.sun.tools.javac.util\n```\n\nBecause the `jdk.compiler` module does not have exports for these packages except to other internal modules, we cannot provide you a `module-info` to do this automatically. Sorry.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcol-e%2Fsourcesolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcol-e%2Fsourcesolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcol-e%2Fsourcesolver/lists"}