01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.aspectwerkz.transform;
05:
06: import com.tc.asm.MethodVisitor;
07:
08: import com.tc.aspectwerkz.transform.inlining.spi.AspectModel;
09:
10: /**
11: * Generic interface for the code generation compilers used in the AspectWerkz weaver.
12: *
13: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
14: */
15: public interface JoinPointCompiler {
16:
17: /**
18: * Compiles the code and returns the bytecode for the compiled code.
19: *
20: * @return the bytecode for the compiled code
21: */
22: byte[] compile();
23:
24: /**
25: * @return the caller class name (slash)
26: */
27: String getCallerClassName();
28:
29: /**
30: * @return the callee class name (slash)
31: */
32: String getCalleeClassName();
33:
34: /**
35: * @return the caller class signature (slash and L..;)
36: */
37: String getCallerClassSignature();
38:
39: /**
40: * @return the callee class signature (slash and L..;)
41: */
42: String getCalleeClassSignature();
43:
44: /**
45: * @return the main compiled artifact (i.e. jit joinpoint) signature (slash)
46: */
47: String getJoinPointClassName();
48:
49: /**
50: * Create an Object[] array on stack at the given index that host the join point arguments
51: *
52: * @param cv
53: * @param stackFreeIndex
54: */
55: void createArgumentArrayAt(final MethodVisitor cv,
56: final int stackFreeIndex);
57:
58: /**
59: * @return all the aspect model interacting with this compiler
60: */
61: AspectModel[] getAspectModels();
62:
63: }
|