-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime invisible annotation support, aka "class"-level annotations #53
Comments
Thanks for raising this, runtime invisible annotations is something that was planned, but hasn't happened as it hasn't been needed. I'll take a look at this over the holidays and look to get it into a release early in the new year. |
Since I've not seen any updates to this issue in a while, I've taken the liberty to make my own small implementation of a hidden annotation syntax. The actual syntax is debatable, but as far as I have tested it, it seems to work. A hidden annotation can be created by prefixing the |
Thank you! Unfortunately life got in the way and I haven't gotten back to this yet, so thanks for jumping in and sending a patch! I'll get this applied soon 👍 |
Apply hidden annotation patch from #53
Thanks again for this @0x3C50 , it's now merged to |
Hi,
I'm currently looking for an assembler to use for writing tests for a transpiler I am developing, and came across this project.
The transpiler searches for methods to transpile based on an annotation either present on the declaring type of a method, or on the method itself. The annotation has retention level CLASS; it is invisible at runtime, but still present in the class file.
Objectweb's ASM represents these annotations as entries in the "invisible annotation" list, and my transpiler checks for the annotation in that list.
Your project seems to treat every annotation in the source file as a runtime visible annotation tho, which results in all annotations being present in the "visible annotation" list, instead of the "invisible annotation" list.
Example:
Source:
Jasm:
Compiling and loading the source version, there is one annotation in the "invisible annotation" list, that being
Annot
. Doing the same thing for the jasm version results in theAnnot
annotation being placed in the "visible annotation" list instead.Code responsible: JasmAssemblingVisitor at line 83:
visitor.visitAnnotation(..., true)
.true
means "runtime visible".I understand this is just a minor nitpick, but I still wanted to make sure you know about this. Is runtime invisible annotation support planned?
The text was updated successfully, but these errors were encountered: