On 9/30/06, Jason Stelzer <[EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 30, 2006, at 9:59 AM, Jay Strauss wrote:

> Hi,
>
> I'm trying to create some java code at runtime, and then use it within
> my Inline::Java.  I have a package that "use"s Inline::Java, and
> within that package, there is a method that creates a string
> containing Java source.
>

Inline works at compile time, not runtime. You may be able to write
some java code that uses a dynamic proxy to inspect the classes
you're interested in. At that point you could generate symbols at
runtime in perl to do whatever you want. IMO using reflection is
probably going to be easier than parsing java code in perl to
accomplish the same task.


I'm unaware of the term "reflection" until I looked it up on
wikipedia, now having read it, I've done it in the past, but don't
really see how to leverage it in this instance.

Based on Patrick's comments, it got the impression there was a way to
supply the Java at runtime.  I could probably do the java creation
within a BEGIN block and supply it at compile time.

Thanks
Jay

Reply via email to