Java – does the custom Lombok extension require a Lombok package?

I've been trying to add custom comments to Lombok My starting point is the source code on GitHub

I added a working comment I can use the included eclipse startup (or build a jar and exchange it into my eclipse. INI) to test and view the results: I have successfully inserted a method into a class

Now, this only works if I put other handler classes under the Lombok package If I put them under another package, they won't work at all I can create a new physical source directory, adjust the build script to include it appropriately, and let my new class exist there, as long as it logically packages the new class under Lombok

Why? Anyway? I want to separate any new content I write into the new top-level package from the official Lombok extension

Solution

Due to the class loader problem in eclipse, Lombok patched the equinox class loader to load the classes in the Lombok package from different locations This is hard coded So your extension must also be in the Lombok package, or you need to modify the code in eclipse patcher to include your own package

Full disclosure: I am one of the developers of Lombok project

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>