Hi,
I have thought about that and from what I understand this seems to be a good idea. 
But than I have a follow-up question:
Does letting a subclass use the deftemplate of a superclass mean that you cannot use 
methods only declared in the subclass? (practically casting to the superclass.)

Thanks for allways replying so swiftly.
/best regards
Mikael

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: JESS: Matching subclasses, writing generic rules




I think Mikael Rundqvist (ERA) wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
> I am using Jess60b3.
> I am working with Jess in a configuration where Jess is an embedded component of the 
>application.
> In the application there are several inheritance hierarchies which I have access to 
>and do several defclasses and definstances on.
> 
> My questions are:
> If a have an inheritance relation on the Java side between two or
more classes, is the inheritance relation automatically reflected in
JESS to the deftemplates created when I do a defclass on both the
superclass and subclasses or must I explicitly state the realtionships
also in Jess?

You have to use "extends" explicitly to do what you want. 

> I think I have managed without the trailing "...extends SuperClassName)" earlier 
>(also in Jess60b3) but I am unable to repeat it.  I think I managed to do it with a 
>bean-style class with a beaninfo class but as can be seen from below the classes I 
>must use are static.
> 

You can use definstance with an object of the child class using the
parent template; maybe that's what you're thinking of.


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to