Subject: Re: interfaces in demeterj
From: Doug Orleans (dougo@ccs.neu.edu)
Date: Thu Nov 29 2001 - 16:26:16 EST
> >I would like to create a class in demeterj that implements an interface.
> >I am also the designer of the interface, so if possible, I would like to
> >use demeterj to define the interface. Is one or both of these possible?
You can define interface classes in the cd file, with the "interface"
keyword, for example
interface FooI = extends BarI.
However, you have to put all the interface method signatures into the
behavior files, for example
FooI {
void doSomething();
int getVal();
}
> >Also, I was wondering if there is some definitive documentation on the
> >syntax of the String that can be passed to a TraversalStrategy, etc., to
> >define a traversal. I haven't been able to find any documents saying
> >exactly what can and can not be used, and in what order.
The DemeterJ User Manual has a chapter on the traversal strategy
notation, and DJ uses the same notation as DemeterJ.
http://www.ccs.neu.edu/research/demeter/software/docs/UserManual/node4.html
The "line graph notation" referred to in that manual is pretty much
identical to the path directive syntax described in Karl's book,
except the asterisks around every keyword are now optional (and
deprecated).
I'm sorry this isn't easily found from the DJ documentation.
--Doug
This archive was generated by hypermail 2b28 : Thu Nov 29 2001 - 16:26:26 EST