01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.bytecode;
06:
07: import com.tc.asm.ClassVisitor;
08: import com.tc.asm.MethodVisitor;
09: import com.tc.asm.Opcodes;
10: import com.tc.aspectwerkz.reflect.MemberInfo;
11: import com.tc.object.logging.InstrumentationLogger;
12:
13: public abstract class AbstractMethodAdapter implements MethodAdapter,
14: Opcodes {
15:
16: protected ManagerHelper managerHelper;
17: protected int access;
18: protected String methodName;
19: protected String originalMethodName;
20: protected String signature;
21: protected String description;
22: protected String[] exceptions;
23: protected InstrumentationLogger instrumentationLogger;
24: protected String ownerDots;
25: protected MemberInfo memberInfo;
26:
27: protected MethodVisitor visitOriginal(ClassVisitor classVisitor) {
28: return classVisitor.visitMethod(access, methodName,
29: description, signature, exceptions);
30: }
31:
32: public abstract MethodVisitor adapt(ClassVisitor classVisitor);
33:
34: public abstract boolean doesOriginalNeedAdapting();
35:
36: public void initialize(ManagerHelper mgrHelper, int acc,
37: String own, String method, String origMethodName,
38: String desc, String sig, String[] ex,
39: InstrumentationLogger instLogger, MemberInfo info) {
40: this.managerHelper = mgrHelper;
41: this.access = acc;
42: this.ownerDots = own;
43: this.methodName = method;
44: this.originalMethodName = origMethodName;
45: this.signature = sig;
46: this.description = desc;
47: this.exceptions = ex;
48: this.instrumentationLogger = instLogger;
49: this.memberInfo = info;
50: }
51:
52: }
|