Esempio n. 1
0
        public MethodReference readMethodReference()
        {
            var babelMethodRef = new MethodReferenceReader(this, reader).read();

            var method = getMethodReference(babelMethodRef);

            if (method == null)
            {
                throw new ApplicationException(string.Format("Could not find method '{0}' in type '{1}'",
                                                             Utils.removeNewlines(babelMethodRef.Name),
                                                             Utils.removeNewlines(babelMethodRef.DeclaringType)));
            }

            var git = babelMethodRef.DeclaringType as GenericInstanceType;

            if (git == null)
            {
                return(method);
            }

            var newMethod = memberReferenceConverter.copy(method);

            newMethod.DeclaringType = babelMethodRef.DeclaringType;
            return(newMethod);
        }
Esempio n. 2
0
 public MethodDefinitionReader(ImageReader imageReader, BinaryReader reader)
 {
     this.bmd = new BabelMethodDefinition();
     this.methodReferenceReader = new MethodReferenceReader(imageReader, reader, bmd);
     this.methodBodyReader      = new MethodBodyReader(imageReader, reader);
 }
Esempio n. 3
0
        public MethodReference readMethodReference()
        {
            var babelMethodRef = new MethodReferenceReader(this, reader).read();

            var method = getMethodReference(babelMethodRef);
            if (method == null) {
                throw new ApplicationException(string.Format("Could not find method '{0}' in type '{1}'",
                            Utils.removeNewlines(babelMethodRef.Name),
                            Utils.removeNewlines(babelMethodRef.DeclaringType)));
            }

            var git = babelMethodRef.DeclaringType as GenericInstanceType;
            if (git == null)
                return method;

            var newMethod = memberReferenceConverter.copy(method);
            newMethod.DeclaringType = babelMethodRef.DeclaringType;
            return newMethod;
        }
Esempio n. 4
0
 public MethodDefinitionReader(ImageReader imageReader, BinaryReader reader)
 {
     this.bmd = new BabelMethodDefinition();
     this.methodReferenceReader = new MethodReferenceReader(imageReader, reader, bmd);
     this.methodBodyReader = new MethodBodyReader(imageReader, reader);
 }