There's a method "findClass()" in jess.Rete which finds Class objects. It
the data from the Jess "import" command so that class names don't have to be
fully qualified. So you could say
((engine) findClass MyClass)
I love it when a question has a clear, unambiguous, helpful answer! :)
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On
Behalf Of Wolfgang Laun
Sent: Wednesday, August 10, 2011 7:27 AM
Subject: JESS: Is there a better Jess equivalent for pack.age.MyClass.class?
If there's an object of a class around, one can do (?obj getClass).
Given only the class name, the only thing I can think of is
(call Class forName pack.age.MyClass)
which can be wrapped into a deffunction but still needs the
full class name as an argument.
There's no static field "class" in a class, and therefore
(call MyClass class)
cannot work (after an import of MyClass).
Is there any better way?