コード例 #1
0
ファイル: ClassRemapper.cs プロジェクト: NickAcPT/NAsm
        public override MethodVisitor VisitMethod(AccessFlags access, string name, string descriptor
                                                  , string signature, string[] exceptions)
        {
            var remappedDescriptor = remapper.MapMethodDesc(descriptor);
            var methodVisitor      = base.VisitMethod(access, remapper.MapMethodName(className
                                                                                     , name, descriptor), remappedDescriptor, remapper.MapSignature(signature, false)
                                                      , exceptions == null ? null : remapper.MapTypes(exceptions));

            return(methodVisitor == null ? null : CreateMethodRemapper(methodVisitor));
        }
コード例 #2
0
ファイル: MethodRemapper.cs プロジェクト: NickAcPT/NAsm
        public override void VisitMethodInsn(int opcodeAndSource, string owner, string name
            , string descriptor, bool isInterface)
        {
            if (api < VisitorAsmApiVersion.Asm5 && (opcodeAndSource & OpcodesConstants.Source_Deprecated
                ) == 0)
            {
                // Redirect the call to the deprecated version of this method.
                base.VisitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface);
                return;
            }

            base.VisitMethodInsn(opcodeAndSource, remapper.MapType(owner), remapper.MapMethodName
                (owner, name, descriptor), remapper.MapMethodDesc(descriptor), isInterface);
        }