File tree Expand file tree Collapse file tree 8 files changed +46
-6
lines changed
sample/src/main/java/org/example
xmldoclet/src/main/java/com/saxonica/xmldoclet/scanners Expand file tree Collapse file tree 8 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -117,3 +117,7 @@ Much of the output is the result of experimentation and exploring the
117
117
Javadoc APIs. If you discover that xmldoclet produces output that
118
118
doesn’t conform to the schema, or if you think that the output is
119
119
incomplete or incorrect, please [ open an issue] ( https://github.com/Saxonica/xmldoclet/issues ) .
120
+
121
+ ## Change log
122
+
123
+ * ** 0.5.0** String constants now use “backslash-U” escapes for non-ASCII characters.
Original file line number Diff line number Diff line change 1
- docletVersion =0.4 .0
2
- schemaVersion =0.4 .0
1
+ docletVersion =0.5 .0
2
+ schemaVersion =0.5 .0
3
3
docletTitle =XmlDoclet
4
4
docletName =xmldoclet
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.2 .1-bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.10 .1-bin.zip
4
4
networkTimeout =10000
5
5
validateDistributionUrl =true
6
6
zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change
1
+ package org .example ;
2
+
3
+ abstract public class AbstractClass implements TestInterface {
4
+ }
Original file line number Diff line number Diff line change
1
+ package org .example ;
2
+
3
+ public class Implementation extends AbstractClass {
4
+ @ Override
5
+ public void foo () {
6
+ // nop
7
+ }
8
+
9
+ @ Override
10
+ public void bar () {
11
+ // nop
12
+ }
13
+ }
Original file line number Diff line number Diff line change 12
12
* @author <a href="mailto:[email protected] ">Norm Tovey-Walsh</a>
13
13
*/
14
14
public class Sample {
15
+ protected static final String cyrillicLower =
16
+ "\u0430 \u0431 \u0432 \u0433 \u0434 \u0435 \u0436 \u0437 \u0438 " +
17
+ "\u043a \u043b \u043c \u043d \u043e \u043f \u0440 \u0441 \u0441 \u0443 " +
18
+ "\u0444 \u0445 \u0446 \u0447 \u0448 \u0449 \u044b \u044d \u044e \u044f " ;
19
+
15
20
public static void main (String [] args ) {
16
21
SampleRuntime runtime = new SampleRuntime ();
17
22
runtime .run ();
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public void foo(Class<? extends Object> spoon) {
92
92
* @see <a href="https://example.org">Example.org</a>
93
93
* @param spoon the string {@link com.sun.source.doctree.DocTree}
94
94
* @throws IllegalAccessError when something goes wrong
95
- * @throws NullPointerException: this is an error. No colon is allowed in the exception name.
95
+ * @throws NullPointerException this is an error. No colon is allowed in the exception name.
96
96
* @see jdk.javadoc.doclet.Doclet#init(Locale, Reporter)
97
97
* @see net.sf.saxon.s9api.Processor#getConfigurationProperty(Feature)
98
98
* @return something
Original file line number Diff line number Diff line change 1
1
package com .saxonica .xmldoclet .scanners ;
2
2
3
- import com .saxonica .xmldoclet .utils .TypeUtils ;
4
3
import com .saxonica .xmldoclet .builder .XmlProcessor ;
4
+ import com .saxonica .xmldoclet .utils .TypeUtils ;
5
5
import com .sun .source .doctree .DocCommentTree ;
6
6
import com .sun .source .doctree .DocTree ;
7
7
import com .sun .source .doctree .ParamTree ;
@@ -36,7 +36,21 @@ public void scan(DocTree tree) {
36
36
attr .put ("value" , element .getConstantValue ().toString ());
37
37
}
38
38
} else {
39
- attr .put ("value" , element .getConstantValue ().toString ());
39
+ StringBuilder sb = new StringBuilder ();
40
+ String value = element .getConstantValue ().toString ();
41
+ int offset = 0 ;
42
+ int length = value .length ();
43
+ while (offset < length ) {
44
+ char cur = value .charAt (offset );
45
+ if (cur < ' ' || cur > 0x7f ) {
46
+ sb .append (String .format ("\\ u%04x" , (int ) cur ));
47
+ } else {
48
+ sb .append (cur );
49
+ }
50
+ offset += Character .charCount (cur );
51
+ }
52
+
53
+ attr .put ("value" , sb .toString ());
40
54
}
41
55
}
42
56
You can’t perform that action at this time.
0 commit comments