1 5 package com.tc.weblogic.transform; 6 7 import com.tc.asm.ClassAdapter; 8 import com.tc.asm.ClassVisitor; 9 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 Opcodes, ClassAdapterFactory { 14 15 public ServletResponseImplAdapter() { 16 super(null); 17 } 18 19 private ServletResponseImplAdapter(ClassVisitor cv, ClassLoader caller) { 20 super(cv); 21 } 22 23 public ClassAdapter create(ClassVisitor visitor, ClassLoader loader) { 24 return new ServletResponseImplAdapter(visitor, loader); 25 } 26 27 public void visit(int version, int access, String name, String signature, String superName, String [] interfaces) { 28 access &= (~ACC_FINAL); super.visit(version, access, name, signature, superName, interfaces); 30 } 31 32 public MethodVisitor visitMethod(int access, String name, String desc, String signature, String [] exceptions) { 33 if ("<init>".equals(name)) { 34 access |= ACC_PROTECTED; 35 } 36 37 access &= ~ACC_FINAL; 39 return super.visitMethod(access, name, desc, signature, exceptions); 40 } 41 } 42 | Popular Tags |