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.weblogic.transform;
06:
07: import com.tc.asm.ClassAdapter;
08: import com.tc.asm.ClassVisitor;
09: import com.tc.asm.MethodVisitor;
10: import com.tc.asm.Opcodes;
11: import com.tc.object.bytecode.ClassAdapterFactory;
12:
13: public class ServletResponseImplAdapter extends ClassAdapter implements
14: Opcodes, ClassAdapterFactory {
15:
16: public ServletResponseImplAdapter() {
17: super (null);
18: }
19:
20: private ServletResponseImplAdapter(ClassVisitor cv,
21: ClassLoader caller) {
22: super (cv);
23: }
24:
25: public ClassAdapter create(ClassVisitor visitor, ClassLoader loader) {
26: return new ServletResponseImplAdapter(visitor, loader);
27: }
28:
29: public void visit(int version, int access, String name,
30: String signature, String super Name, String[] interfaces) {
31: access &= (~ACC_FINAL); // class is final in weblogic 8.1 less than SP6
32: super .visit(version, access, name, signature, super Name,
33: interfaces);
34: }
35:
36: public MethodVisitor visitMethod(int access, String name,
37: String desc, String signature, String[] exceptions) {
38: if ("<init>".equals(name)) {
39: access |= ACC_PROTECTED;
40: }
41:
42: access &= ~ACC_FINAL; // make it possible to delegate all methods in our psuedo-wrapper
43:
44: return super.visitMethod(access, name, desc, signature,
45: exceptions);
46: }
47: }
|