1
2
3
4
5
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 }