[Swift-devel] Re: runtime mapper loading of mappers
Ben Clifford
benc at hawaga.org.uk
Fri Sep 28 09:34:41 CDT 2007
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