View Javadoc

1   /*
2    * Created on 30-Jan-2005
3    *
4    * TODO To change the template for this generated file go to
5    * Window - Preferences - Java - Code Style - Code Templates
6    */
7   package edu.asu.cri.MirkE.trace;
8   
9   import edu.asu.cri.MirkE.trace.MirkELogger;
10  
11  /***
12   * @author abuayyub
13   *
14   * i've checked this in but i think aspect programming
15   * cannot deal with static method calls to objects not on the stack. i think this is probably
16   * because AOP must accesses static stuff through a staticpart of a joinpoint.
17   * i was trying to initialise a static object and call the method from the advice
18   */
19  public final class MirkELoggerFactory {
20      
21      static MirkELogger logger = null;
22      
23      /***
24       * @return new instance of MirkELogger 
25       */
26      public static MirkELogger getInstance(){
27          
28          if(logger == null){
29              System.out.println("return a Mirkeloger");
30              logger = new MirkELogger();
31          }
32          return logger;
33      }
34  }