Hi,
you should go through the normal Clojure Vars to access the functions. To
actually call the functions you use invoke. Note: table is a macro, so you
can't call it directly. You have to use the table* function and do any sugar
provided by the table macro yourself. Here is an example how this could look
like:
import clojure.lang.RT;
import clojure.lang.Var;
public class Foo {
// Required core functions.
static final Var symbol = RT.var("clojure.core", "symbol");
static final Var require = RT.var("clojrue.core", "require");
static final Var keyword = RT.var("clojure.core", "keyword");
static {
require.invoke(symbol.invoke("lobos.core"));
static final Var create = RT.var("lobos.core", "create");
static final Var table = RT.var("lobos.core", "table*");
}
void frobnicate() {
final Object db = RT.map(
keyword.invoke("classname"), "org.postgresql.Driver",
keyword.invoke("subprotocol"), "postgresql",
keyword.invoke("user"), "postgres",
keyword.invoke("password"), "",
keyword.invoke("subname"), "//localhost:5432/flyway"
);
create.invoke(db, table.invoke(keyword.invoke("some-name")));
}
}
Untested, though.
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en