[Swift-devel] Re: runtime mapper loading of mappers
Mihael Hategan
hategan at mcs.anl.gov
Fri Sep 28 09:38:12 CDT 2007
ClassLoader.loadClass()?
On Fri, 2007-09-28 at 14:34 +0000, Ben Clifford wrote:
> On Fri, 28 Sep 2007, Mihael Hategan wrote:
>
> > Can you be more specific?
>
> at present there's no clear way to get a mapper class from outside of the
> swift build installed into the runtime such that it can be used by
> swiftscript programs - you need to add a registration line somewhere in
> code that gets run during swift startup (as happens for all existing
> mappers in MapperFactory.java) so that references to a mapper in a
> SwiftScript program will end up using the appropriate class.
>
> i would like ultimately to have a way to make that happen without a
> rebuild of Swift.
>
> There are various ways to do it - eg config files listing the bindings
> instead of hardcoding them; or listing classes that are to be loaded (and
> have static initialisers run) at startup time, with the static init code
> knowing the binding.
>
More information about the Swift-devel
mailing list