Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exoad/meta_javac
A generalized plugin library for the Javac compiler
https://github.com/exoad/meta_javac
java java-compiler javac
Last synced: about 7 hours ago
JSON representation
A generalized plugin library for the Javac compiler
- Host: GitHub
- URL: https://github.com/exoad/meta_javac
- Owner: exoad
- License: bsd-4-clause
- Created: 2023-02-07T04:26:51.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-18T18:15:43.000Z (over 1 year ago)
- Last Synced: 2024-11-08T00:11:27.007Z (about 7 hours ago)
- Topics: java, java-compiler, javac
- Language: Java
- Homepage:
- Size: 38.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
JMCC - JackMeng Configurable Compiler (4j)
DORMANT REPO: I am not currently working on this project due to other projects conflicting with my workload
[WARNING]
It is highly recommended to not use anything from the "com.sun" packages due to them being
very vendor specific and thus this standalone plugin will try its best to avoid doing
so through the usage via "javax.lang" and the ToolsAPI. However, for older and less
specific plugins, "com.sun" will be utilized.Furthermore, due the prevalence of different versions under the "javax.lang" module,
all specified versions & utility class will be written and included:
1. 14 -> Files prefixed with "se14_"
2. 9 -> Files prefixed with "se09_"
3. 8 -> Files prefixed with "se08_"
Note: 6,7 are not supported due to them being slightly obsolete and the dire preference
to stay up to date.
Thus different SDK versions will require different build versions and so force.The reason being that many compiler related libraries were removed from the unreliable "com.sun.*" packages.
One such JAR that is crucial to make a functional plugin is required from "tools.jar" under
"$JAVA_HOME/lib/" which has been unfortunately removed since Java 9 (messed up everything).If you would like to tag along with my development environment, you may follow with the
below specifications:JDK Base : OpenJDK Build 2022-07-19
JDK Vendor : Adoptium (Eclipse) Temurin [https://adoptium.net/about/]
JDK Version : 17.0.4 (build 17.0.4+8)This repository contains a set of plugins that I have created for the Javac compiler. Much of these
plugins aim to increase functionality and the ability for the user to define certain functionalities
based on certain compilation params. However, there are certain limitations within the compiler
itself that can also influence how things can work and how certain pragmas can be called be
between source and compiler. For example, you cannot simply leech a macro find and replace tool
onto Javac's annotation parsing phase, instead you most definitely need to either:
1. Write a parser that handles the macros beforehand and then invokes the Javac compiler
2. Write a precheck for Javac that is ran in the first cycle of the Javac compilation life
cycle. [This however, heavily depends on Javac implementation]In general, you should not depend on these plugins to make Java much more friendlier, instead, it
is probably far less problematic to use a different language. Additionally, plugins here can
break at any time due to inconsistent source file versions and other different stuffs between
JDK providers and Javac implementations.== File prefixing legend ==
This legend adds some prefixes that are native to this project and does"se14"
For files relating to the specific SE Release Version 14
- Highly environment specific"se08"
For files relating to the specific SE Release Version 8 (1.8)
- Highly environment specific"se09"
For files relating to the specific SE Release Version 9
- Highly environment specific"csun"
For files relating to the specific module "com.sun" and utilizes its defunct routines
- EXTREMELY ENVIRONMENT & COMPILER SPECIFIC"_"
Standard annotation that is checked and validated by this plugin"__"
Internal to external interfaces that are exposed so certain functionalities like being
able to be recognized as a Javac compiler etc..