JESS: Question about deftemplate(from-class xxx)

View: New views
2 Messages — Rating Filter:   Alert me  

JESS: Question about deftemplate(from-class xxx)

by Marco Zappatore :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Dear Jess users,
the command
(deftemplate myClass ((declare (from class mypackage.myclass)))
can be used as a one shot command in order to create deftemplates for each
of a java class in a given package?

Thanks in advance
  Marco Zappatore
 
--
View this message in context: http://www.nabble.com/Question-about-deftemplate%28from-class-xxx%29-tp25712737p25712737.html
Sent from the Jess mailing list archive at Nabble.com.



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users you@...'
in the BODY of a message to majordomo@..., NOT to the list
(use your own address!) List problems? Notify owner-jess-users@....
--------------------------------------------------------------------


Parent Message unknown Re: JESS: Question about deftemplate(from-class xxx)

by Ernest Friedman-Hill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not sure what the question is, or what you mean by "one shot  
command", but that syntax (minus the extra parentheses) will let you  
create templates from Java classes. Are you asking whether there's a  
way to have Jess create a template for all the classes in a package  
using a single command? No. Java doesn't even provide a way to list  
all the classes in a package, since it's a rather open-ended concept.

On Oct 2, 2009, at 5:18 AM, Marco Zappatore wrote:

>
> Dear Jess users,
> the command
> (deftemplate myClass ((declare (from class mypackage.myclass)))
> can be used as a one shot command in order to create deftemplates  
> for each
> of a java class in a given package?
>
> Thanks in advance
>  Marco Zappatore
>

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            ejfried@...
Livermore, CA 94550                             http://www.jessrules.com





--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users you@...'
in the BODY of a message to majordomo@..., NOT to the list
(use your own address!) List problems? Notify owner-jess-users@....
--------------------------------------------------------------------