/// <summary> /// Gets the return type of a method. /// </summary> /// <param name="module">The module.</param> /// <param name="descriptor">The java type descriptor.</param> /// <returns>The return type of the java descriptor.</returns> public static TypeReference GetReturnType(this ModuleDefinition module, string descriptor) { Guard.NotNull(ref module, nameof(module)); Guard.NotNull(ref descriptor, nameof(descriptor)); return(module.GetDescriptorType(DescriptorHelper.GetReturn(descriptor))); }
/// <summary> /// Gets the return type of a method. /// </summary> /// <param name="jm">The java method.</param> /// <param name="jc">The java class.</param> /// <returns>The return type of the java method.</returns> public static string GetReturnType(this JavaMethod jm, JavaClass jc) { Guard.NotNull(ref jc, nameof(jc)); Guard.NotNull(ref jm, nameof(jm)); string descriptor = jm.GetDescriptor(jc); return(DescriptorHelper.GetReturn(descriptor)); }