コード例 #1
0
ファイル: MethodDefinition.cs プロジェクト: shuixi2013/Dexer
 // for prefetching
 internal MethodDefinition(MethodReference mref)
     : this()
 {
     Owner = mref.Owner as ClassDefinition;
     Name = mref.Name;
     Prototype = mref.Prototype;
 }
コード例 #2
0
ファイル: DexReader.cs プロジェクト: shuixi2013/Dexer
        private void ReadMethodReferences(BinaryReader reader)
        {
            reader.PreserveCurrentPosition(Header.MethodReferencesOffset, () =>
            {
                for (var i = 0; i < Header.MethodReferencesSize; i++)
                {
                    int classIndex = reader.ReadUInt16();
                    int prototypeIndex = reader.ReadUInt16();
                    int nameIndex = reader.ReadInt32();

                    var mref = new MethodReference
                    {
                        Owner = (CompositeType) Dex.TypeReferences[classIndex],
                        // Clone the prototype so we can annotate & update it easily
                        Prototype = Dex.Prototypes[prototypeIndex].Clone(),
                        Name = Dex.Strings[nameIndex]
                    };

                    Dex.MethodReferences.Add(mref);
                }
            });
        }
コード例 #3
0
ファイル: MethodReference.cs プロジェクト: shuixi2013/Dexer
 public bool Equals(MethodReference other)
 {
     return Owner.Equals(other.Owner)
         && Name.Equals(other.Name)
         && Prototype.Equals(other.Prototype);
 }
コード例 #4
0
ファイル: Dex.cs プロジェクト: shuixi2013/Dexer
 public MethodReference Import(MethodReference mref)
 {
     foreach (MethodReference item in MethodReferences)
     {
         if (mref.Equals(item))
         {
             return item;
         }
     }
     MethodReferences.Add(mref);
     return mref;
 }
コード例 #5
0
ファイル: MethodReference.cs プロジェクト: oujunke/Dexer
 public bool Equals(MethodReference other)
 {
     return(Owner.Equals(other.Owner) &&
            Name.Equals(other.Name) &&
            Prototype.Equals(other.Prototype));
 }
コード例 #6
0
 // for prefetching
 internal MethodDefinition(MethodReference mref) : this()
 {
     Owner     = mref.Owner as ClassDefinition;
     Name      = mref.Name;
     Prototype = mref.Prototype;
 }