KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > emn > info > eaop > aspect > Fst


1 /* ----------------------------------------------------------------------------
2  * EAOP 1.0, 2002-12-19
3  * (c) 2002 Remi Douence, Mario Sudholt; OBASCO group; EMN/INRIA; France
4  * THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY
5   -------------------------------------------------------------------------- */

6
7 package fr.emn.info.eaop.aspect;
8
9 import fr.emn.info.eaop.Monitor;
10
11 import java.util.*;
12 import java.lang.reflect.*;
13 import java.io.*;
14
15 /**
16  * This class implements binary nodes in the tree of aspects. When the
17  * first aspect crosscuts, the second is not woven (see definition
18  * of the method <code>go()</code>)
19  *
20  * @author RD
21  * @version 1.0
22  */

23 public class Fst extends BinaryAspectS {
24
25     public Fst(AspectS a1, AspectS a2) {
26     this(a1, a2, null);
27     }
28     public Fst(AspectS a1, AspectS a2, AspectS up) {
29     super(a1, a2, up);
30     }
31     public void go() {
32     Monitor.monitor.path.push(this);
33     this.a1.go();
34     this.isCrosscutting = this.a1.isCrosscutting;
35     if (! this.a1.isCrosscutting) {
36        this.a2.go();
37        this.isCrosscutting = this.isCrosscutting || this.a2.isCrosscutting;
38     }
39     Monitor.monitor.path.pop();
40     }
41 }
42
43
Popular Tags