// for prefetching internal MethodDefinition(MethodReference mref) : this() { Owner = mref.Owner as ClassDefinition; Name = mref.Name; Prototype = mref.Prototype; }
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); } }); }
public bool Equals(MethodReference other) { return Owner.Equals(other.Owner) && Name.Equals(other.Name) && Prototype.Equals(other.Prototype); }
public MethodReference Import(MethodReference mref) { foreach (MethodReference item in MethodReferences) { if (mref.Equals(item)) { return item; } } MethodReferences.Add(mref); return mref; }
public bool Equals(MethodReference other) { return(Owner.Equals(other.Owner) && Name.Equals(other.Name) && Prototype.Equals(other.Prototype)); }