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: import java.lang.reflect.Member;
26: import ch.ethz.jvmai.MethodWeaver;
27:
28: /**
29: * Interface for wrappers for <CODE>HotSwapClassWeaver</CODE> implementations.
30: * The wrapper is used by <CODE>HotSwapClassWeaver</CODE> to invoke static
31: * methods of the real weaver.
32: *
33: * @author Angela Nicoara
34: * @author Gerald Linhofer
35: *
36: */
37: public interface HotSwapClassWeaverWrapper {
38: /**
39: * Re-Weaves all modified classes and activates them.
40: */
41: public void commit();
42:
43: /**
44: * Get a unique method weaver for 'target'.
45: *
46: * @param target method for which a weaver will be returned.
47: * @return MethodWeaver associated to <CODE>target</CODE>.
48: */
49: public MethodWeaver getWeaver(Member target);
50:
51: /**
52: * Returns the Member object associated to <CODE>methodId</CODE>
53: * or <CODE>null</CODE>, if <CODE>methodID</CODE> is not a valid
54: * id.
55: *
56: * @param methodId id for the Method that will be returned.
57: * @return Method associated to <CODE>methodID<CODE> or <CODE>null</CODE>.
58: * @throws ArrayOutOfBoundException
59: */
60: public Member idToMethod(int methodId);
61:
62: /**
63: * Resets all woven classes.
64: */
65: public void resetAll();
66:
67: /**
68: * Sets the aspect interface, must be called before any call to
69: * {@link #commit commit}.
70: *
71: * @param ai
72: */
73: public void setAspectInterface(HotSwapAspectInterfaceImpl ai);
74: }
75:
76: //======================================================================
77: //
78: //$Log$
79: //
|