qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] XqlServlet


From: Per Bothner
Subject: Re: [Qexo-general] XqlServlet
Date: Wed, 15 Jan 2003 23:38:26 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

Ivelin Ivanov wrote:

One more question.
What API can I use to compile an xql file as a servlet in memory?

There isn't a single call, but if you follow kawa.repl.main's handling
of the -C flag you'll get to kawa.lang.CompileFile.compile_to_file.
That is basically CompileFile.read, which returns a Compilation,
and then calls Compilation.compileToFiles.  You can replace the
latter by ModuleExp.evalModule.

One possible problem is that a single xql file may result in multiple
classes.

That's ok - either way you have to create a ClassLoader, which will
"load" all the classes as needed.  ModuleExp's evalToModule calls
evalToClass, which creates an ArrayClassLoader.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]