Ejemplo n.º 1
0
 public MethodVisitor visitMethod(
     final int access,
     final String name,
     final String desc,
     final String signature,
     final String[] exceptions) {
   checkState();
   checkAccess(
       access,
       Opcodes.ACC_PUBLIC
           + Opcodes.ACC_PRIVATE
           + Opcodes.ACC_PROTECTED
           + Opcodes.ACC_STATIC
           + Opcodes.ACC_FINAL
           + Opcodes.ACC_SYNCHRONIZED
           + Opcodes.ACC_BRIDGE
           + Opcodes.ACC_VARARGS
           + Opcodes.ACC_NATIVE
           + Opcodes.ACC_ABSTRACT
           + Opcodes.ACC_STRICT
           + Opcodes.ACC_SYNTHETIC
           + Opcodes.ACC_DEPRECATED
           + 0x40000); // ClassWriter.ACC_SYNTHETIC_ATTRIBUTE
   CheckMethodAdapter.checkMethodIdentifier(name, "method name");
   CheckMethodAdapter.checkMethodDesc(desc);
   if (signature != null) {
     CheckMethodAdapter.checkMethodSignature(signature);
   }
   if (exceptions != null) {
     for (int i = 0; i < exceptions.length; ++i) {
       CheckMethodAdapter.checkInternalName(exceptions[i], "exception name at index " + i);
     }
   }
   if (checkDataFlow) {
     return new CheckMethodAdapter(
         access, name, desc, cv.visitMethod(access, name, desc, signature, exceptions), labels);
   } else {
     return new CheckMethodAdapter(
         cv.visitMethod(access, name, desc, signature, exceptions), labels);
   }
 }