I actually posted my question in the clamp “thread” but I guess opening a new thread would potentially make more people answering J


Below, you will find the reply from Charlie groves and below that my questions follows. I’d appreciate, if you have an answer or any helpful comment.


> Actually, clamp isn't needed for your use case.  Clamp lets you put

> decorators on python classes to turn them into something callable from

> Java.  If you're just trying to extend a Java class, you just need the

> ability to statically compile and name those proxies.  Clamp needed

> that as well, which is why the two keep getting conflated.


> Well, the majority of the work is already available in the

> customizable-proxymaker branch in the jython repository.  That already

> contains the static compilation you need.

> The major work remaining there for

> your use case is a) adding a tool to take advantage of the static

> proxy compilation and b) using that to visit all the classes in the

> standard lib that need it and make  static proxies for them.


Ah, Ok...I have a vague idea of what I could do. But still, despite the fact that it's not completed yet, would't it be easier for me to use clamp by adding annotations to the python code than to write new tools to statically change the class proxies.


However, I checked out the code from the branch and I compiled it. But what now? :) I know, to answer such a question would be very time-consuming for you and you already drew a rough sketch. But I am currently sitting in front of huge stack of source files and don't know where to start. I would need some kind of entry point ;) Here are some questions that fly around in my head:


1.) At first, to fulfill a) can I use the resulting jython.jar file from that customizable-proxymaker branch build and create an external app? Or do I have to somehow "hook" into the existing code? If yes, how would I trigger that? By using compileall? What if I don't want to expose all methods?

2.) I think I need to understand the code structure and hierarchy of jython/proxymaker i.e. "what does what and when does it 'that'?" To do that, could you please tell me which class is the main entry point for the proxymaker? I saw that you modified some classes in the org.python.exposed package but couldn't identify a main class from which I could start studying...


Thanks in advance!