01: //
02: // This file is part of the prose package.
03: //
04: // The contents of this file are subject to the Mozilla Public License
05: // Version 1.1 (the "License"); you may not use this file except in
06: // compliance with the License. You may obtain a copy of the License at
07: // http://www.mozilla.org/MPL/
08: //
09: // Software distributed under the License is distributed on an "AS IS" basis,
10: // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11: // for the specific language governing rights and limitations under the
12: // License.
13: //
14: // The Original Code is prose.
15: //
16: // Contributor(s):
17: // $Id$
18: // =====================================================================
19: //
20: // (history at end)
21: //
22:
23: package ch.ethz.inf.iks.jvmai.jvmdi;
24:
25: // used packages/classes
26: import ch.ethz.jvmai.JVMAspectInterface;
27:
28: import ch.ethz.jvmai.Provider;
29:
30: /**
31: * HotSwapProvider class.
32: *
33: * @version $Revision$
34: * @author Angela Nicoara
35: * @author Gerald Linhofer
36: */
37: public class HotSwapProvider extends Provider {
38:
39: public HotSwapProvider() {
40: super ();
41: }
42:
43: private static HotSwapAspectInterfaceImpl daspect;
44:
45: private static boolean isInitialized = false;
46:
47: private static synchronized void idempotentInit() {
48: if (!isInitialized) {
49: daspect = HotSwapAspectInterfaceImpl.getInstance();
50: isInitialized = true;
51: }
52: }
53:
54: /**
55: * Returns the apect-interface of the jvmai-system supported by this provider.
56: */
57: public JVMAspectInterface getAspectInterface() {
58: idempotentInit();
59: return daspect;
60: }
61:
62: }
63:
64: //======================================================================
65: //
66: // $Log$
67: //
|