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.inlining.compiler;
05:
06: import com.tc.aspectwerkz.transform.TransformationConstants;
07:
08: /**
09: * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
10: */
11: public class CompilerInput {
12:
13: public String joinPointClassName;
14:
15: public int joinPointInstanceIndex = TransformationConstants.INDEX_NOTAVAILABLE;
16:
17: public boolean isOptimizedJoinPoint = false;
18:
19: /**
20: * Index on stack of the first target method arg (0 or 1, depends of static target or not
21: */
22: public int argStartIndex = TransformationConstants.INDEX_NOTAVAILABLE;
23:
24: public int callerIndex = TransformationConstants.INDEX_NOTAVAILABLE;
25: public String callerClassSignature;
26:
27: public int calleeIndex = TransformationConstants.INDEX_NOTAVAILABLE;
28: public String calleeClassSignature;
29:
30: /**
31: * Returns a new instance that suits for proceed() ie where jp index is 0 etc.
32: *
33: * @return
34: */
35: public CompilerInput getCopyForProceed() {
36: CompilerInput input = new CompilerInput();
37: input.joinPointClassName = joinPointClassName;
38: input.calleeClassSignature = calleeClassSignature;
39: input.callerClassSignature = callerClassSignature;
40:
41: // proceed() needs specific values
42: input.isOptimizedJoinPoint = false;
43: input.joinPointInstanceIndex = 0;
44: return input;
45: }
46: }
|