KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > bytecode > AbstractMethodAdapter


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.bytecode;
5
6
7 import com.tc.asm.ClassVisitor;
8 import com.tc.asm.MethodVisitor;
9 import com.tc.asm.Opcodes;
10 import com.tc.object.logging.InstrumentationLogger;
11
12 public abstract class AbstractMethodAdapter implements MethodAdapter, Opcodes {
13
14   protected ManagerHelper managerHelper;
15   protected int access;
16   protected String JavaDoc methodName;
17   protected String JavaDoc originalMethodName;
18   protected String JavaDoc signature;
19   protected String JavaDoc description;
20   protected String JavaDoc[] exceptions;
21   protected InstrumentationLogger instrumentationLogger;
22   protected String JavaDoc ownerDots;
23
24   public AbstractMethodAdapter() {
25     super();
26   }
27
28   protected MethodVisitor visitOriginal(ClassVisitor classVisitor) {
29     return classVisitor.visitMethod(access, methodName, 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, String JavaDoc own, String JavaDoc method, String JavaDoc origMethodName,
37                          String JavaDoc desc, String JavaDoc sig, String JavaDoc[] ex, InstrumentationLogger instLogger) {
38     this.managerHelper = mgrHelper;
39     this.access = acc;
40     this.ownerDots = own;
41     this.methodName = method;
42     this.originalMethodName = origMethodName;
43     this.signature = sig;
44     this.description = desc;
45     this.exceptions = ex;
46     this.instrumentationLogger = instLogger;
47   }
48
49 }
50
Popular Tags