Add overloaded methods to openjdk 11 & 8
Unified · Split
| @@ -27,34 +27,24 @@ module Docs · 26 unmodified lines | ||
| 27 | 27 | end |
| 28 | 28 | |
| 29 | 29 | def additional_entries |
| 30 | − # Only keep the first found entry with a unique name, | |
| 31 | − # i.e. overloaded methods are skipped in index | |
| 32 | − if version == '8' || version == '8 Gui' || version == '8 Web' | |
| 33 | − css('a[name$=".summary"]').each_with_object({}) do |summary, entries| | |
| 34 | − next if summary['name'].include?('nested') || summary['name'].include?('constructor') || | |
| 35 | − summary['name'].include?('field') || summary['name'].include?('constant') | |
| 36 | − summary.parent.css('.memberNameLink a').each do |node| | |
| 37 | − name = node.parent.parent.content.strip | |
| 38 | − name.sub! %r{\(.+?\)}m, '()' | |
| 39 | − id = node['href'].remove(%r{.*#}) | |
| 40 | − entries[name] ||= ["#{self.name}.#{name}", id] | |
| 41 | − end | |
| 42 | − end.values | |
| 30 | + entries = [] | |
| 43 | 31 | |
| 44 | − else | |
| 45 | − css('a[id$=".summary"]').each_with_object({}) do |summary, entries| | |
| 46 | − next if summary['id'].include?('nested') || summary['id'].include?('constructor') || | |
| 47 | − summary['id'].include?('field') || summary['id'].include?('constant') | |
| 48 | − summary.parent.css('.memberNameLink a').each do |node| | |
| 49 | − name = node.parent.parent.content.strip | |
| 50 | − name.sub! %r{\(.+?\)}m, '()' | |
| 51 | − id = node['href'].remove(%r{.*#}) | |
| 52 | − entries[name] ||= ["#{self.name}.#{name}", id] | |
| 53 | − end | |
| 54 | − end.values | |
| 32 | + css('.memberNameLink a').each do |node| | |
| 33 | + next unless node['href'].match?(/[-(]/) # skip non-methods | |
| 34 | + | |
| 35 | + if (version=='8' || version == '8 GUI' || version == '8 Web') | |
| 36 | + id = node['href'].gsub(/.*#/, '') | |
| 37 | + else | |
| 38 | + id = slug.downcase + node['href'] | |
| 39 | + end | |
| 40 | + | |
| 41 | + entries << [self.name + '.' + node.content + '()', id] | |
| 55 | 42 | end |
| 56 | 43 | |
| 44 | + entries | |
| 45 | + | |
| 57 | 46 | end |
| 47 | + | |
| 58 | 48 | end |
| 59 | 49 | end |
| 60 | 50 | end |
| @@ -59,6 +59,7 @@ module Docs · 58 unmodified lines | ||
| 59 | 59 | |
| 60 | 60 | version '8' do |
| 61 | 61 | self.release = '8' |
| 62 | + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' | |
| 62 | 63 | |
| 63 | 64 | html_filters.push OLDFILTERS |
| 64 | 65 | |
| @@ -90,6 +91,7 @@ module Docs · 25 unmodified lines | ||
| 90 | 91 | |
| 91 | 92 | version '8 GUI' do |
| 92 | 93 | self.release = '8' |
| 94 | + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' | |
| 93 | 95 | |
| 94 | 96 | html_filters.push OLDFILTERS |
| 95 | 97 | |
| @@ -102,6 +104,7 @@ module Docs · 6 unmodified lines | ||
| 102 | 104 | |
| 103 | 105 | version '8 Web' do |
| 104 | 106 | self.release = '8' |
| 107 | + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' | |
| 105 | 108 | |
| 106 | 109 | html_filters.push OLDFILTERS |
| 107 | 110 | |