Exemple #1
0
        internal void resolveReferences(MetaDataLoader loader,
                                        MetaDataTypeDefinition[] fieldOwners,
                                        MetaDataTypeDefinition[] methodOwners)
        {
            this.extends = loader.getTypeDefOrRef(this.extendsIndex);
            // fieldOwners[fieldOwners.Length-1] == null, so this is safe
            int fieldEndIndex = this.fieldIndex;

            while (fieldOwners[fieldEndIndex] == this)
            {
                loader.getField(fieldEndIndex).resolveReferences(this);
                fieldEndIndex++;
            }
            int fieldCount = fieldEndIndex - this.fieldIndex;

            this.fieldArray = loader.getFields(this.fieldIndex, fieldCount);
            // methodOwners[methodOwners.Length-1] == null, so this is safe
            int methodEndIndex = this.methodIndex;

            while (methodOwners[methodEndIndex] == this)
            {
                loader.getMethod(methodEndIndex).setParent(this);
                methodEndIndex++;
            }
            int methodCount = methodEndIndex - this.methodIndex;

            this.methodArray = loader.getMethods(this.methodIndex, methodCount);
        }