Re: Project

Subject: Re: Project
From: Pengcheng Wu (
Date: Tue Nov 19 2002 - 17:29:42 EST

After processing the .cd file, DemeterJ (actually by JavaCC) will produce
3 parse(..) methods for each nonabstract class. Those parse methods have
the following signatures respectively(e.g., for class A):

  public static A parse( in);
  public static A parse( in);
  public static A parse(String in);

In this situation, you can create an InputStream(e.g., a FileInputStream
object) object from the file names passed in from command line; or create
a Reader object from the file names and pass one of them into the
corresponding parse method.

Refer to the Java API to figure out how to create an InputStream object or
a Reader object from a file name.

--Pengcheng Wu

On Tue, 19 Nov 2002, A student wrote:

> I am getting an error when i try to run my program. It seems that you
> cannot pass a filename to TraversalAspect.parse(). When i pass the
> argument supplied by the .prj argument list, the traversalaspect tries to
> parse the filename instead of the file itself, so i get an error similar
> to: found BasketTraversal was excepting "aspect" ...
> How do I pass a file to the traversalAspect, should i use inputreader
> somehow?

This archive was generated by hypermail 2b28 : Tue Nov 19 2002 - 17:29:43 EST