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.object.bytecode;
05:
06: import com.tc.asm.ClassVisitor;
07: import com.tc.asm.MethodVisitor;
08: import com.tc.aspectwerkz.reflect.MemberInfo;
09: import com.tc.object.logging.InstrumentationLogger;
10:
11: /**
12: * Interface for something that can modify methods
13: */
14: public interface MethodAdapter {
15:
16: /**
17: * Initialize the method adapter with resources
18: * @param managerHelper Helper to call methods on the Manager
19: * @param access Access modifier for method
20: * @param owner Owner class name
21: * @param methodName Modified method name
22: * @param originalMethodName Original method name
23: * @param description Method description (params and return type)
24: * @param sig The method's signature. May be null if the
25: * method parameters, return type and exceptions do not use generic
26: * types.
27: * @param exceptions Exceptions thrown by the method
28: * @param instrumentationLogger The logger
29: * @param memberInfo Member info
30: */
31: public void initialize(ManagerHelper managerHelper, int access,
32: String owner, String methodName, String originalMethodName,
33: String description, String sig, String[] exceptions,
34: InstrumentationLogger instrumentationLogger,
35: MemberInfo memberInfo);
36:
37: /**
38: * Create a method visitor from the class visitor
39: * @param classVisitor Modifies classes
40: * @return Method visitor that can modify methods
41: */
42: public MethodVisitor adapt(ClassVisitor classVisitor);
43:
44: /**
45: * Checks whether original needs adapting
46: * @return True to adapt
47: */
48: public boolean doesOriginalNeedAdapting();
49:
50: }
|