Subject: Re: COM3205 HW 1
From: Paul Freeman (pfreeman@ccs.neu.edu)
Date: Mon Oct 07 2002 - 12:53:44 EDT
Hi Hugo -
The assignment says:
"In addition, for each method execution in your
source code, print the method execution join points
that are currently active (the stack trace)
and the list of arguments of the execution that
is on top of the stack."
The code you included below does not do this. First of all, the code
below is executed at method "calls", not "executions" - there is a
difference.
Second, the code below prints out a single statement regarding the
status of various objects available at thisJoinPoint. (NOTE: one of the
statements is wrong and needs to be changed!)
The code provided in the homework (not the code below) does have the
capacity to print arguments of methods. You do not have to duplicate
this functionality, but you do need to use it in the correct place.
The "stack trace" that is being requested is a list of the methods that
are currently executing, printed at each method execution. You will
need to add the code that will keep track of and print this. It
definitely does not occur the way the code is.
Hope this helps,
Paul
Hugo Trappe wrote:
> The assignment is to fill in the unknowns and then add code to record
> the stack trace. Sample output is given. I've filled in the unknowns
> and my output matches the sample output. Do I need to add code to
> record the stack trace? It looks like the code to record the stack
> trace is already there.
>
> Is this a cut and paste error (from the code in part 1)?
>
> ...
> if (thisObject == null) {
> System.out.println(JPUtil.toString(thisJoinPoint));
> System.out.println(" *** call in static method");
> }
> if (UNKNOWN6 == null) {
> System.out.println(JPUtil.toString(thisJoinPoint));
> System.out.println(" *** call in static method");
> }
> ...
>
>
> Thanks,
>
> Hugo
>
>
This archive was generated by hypermail 2b28 : Mon Oct 07 2002 - 12:56:17 EDT