Wish Proxy objects with XML docs or JSON docs support

FrostCodes

Active Member
Licensed User
Longtime User
Hi, I was working on a project and noticed I could not find a finished library in the forum
so I wanted to wrap it using JavaObject but I decided to be lazy and went to ChatGpt.

ChatGpt generated the code but it was wrongly arranged and In Java, so I told it to change it to B4J code,
It was still wrong but then I got an idea from it.

The Idea is a programming concept called Proxies. I know we have JavaObject and Reflection but think about this:
a sort of Proxy Inside the IDE that allows us to use Java codes/imports as if it was wrapped for B4J.

1695472461935.png


As you can see, I added a yellow text that allows the IDE to internally compile that Object (PDFMergerUtility) as import org.apache.pdfbox.multipdf.PDFMergerUtility
As for how the IDE would know the methods available, we can create a tool that allows the library creator to create the docs
like a standard b4x library docs in XML or JSON.
The library itself would not need methods or anything unless some extra methods (like event listeners) need to be
added or overridden, it would simply be a skeleton project.

I believe this would enable fast wrapping of any libraries as developers can parse docs
from the Java project with a parser and create the docs or write them manually.
 
Last edited:
Top