Skip to content

Commit

Permalink
Merge pull request #9 from Saxonica/fix-method-names
Browse files Browse the repository at this point in the history
Fix method names
  • Loading branch information
ndw authored Sep 20, 2024
2 parents c4fe46f + 3b5223c commit de4711a
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 3 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ incomplete or incorrect, please [open an issue](https://github.com/Saxonica/xmld

## Change log

* **0.8.0** Fixed method names

Output the “simple” method name in the name attribute on method elements.
The full signature is also provided and the parameters and their types are available
from children.

* **0.7.0** Improved presentation of interfaces

Reworked the way interfaces are presented so that the methods inherited
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docletVersion=0.7.0
schemaVersion=0.7.0
docletVersion=0.8.0
schemaVersion=0.8.0
docletTitle=XmlDoclet
docletName=xmldoclet
5 changes: 5 additions & 0 deletions sample/src/main/java/org/example/Locale.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.example;

public class Locale {
// Not the java.util.Locale class
}
4 changes: 4 additions & 0 deletions sample/src/main/java/org/example/TestClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import jdk.javadoc.doclet.Reporter;
import net.sf.saxon.lib.Feature;
import net.sf.saxon.serialize.charcode.CharacterSet;
import java.util.Locale;

import java.lang.reflect.Parameter;
import java.util.*;
Expand Down Expand Up @@ -78,6 +79,9 @@ public static int combinePair(char high, char low) {
}

public void foo(Class<? extends Object> spoon) {
}

public void bar(Locale myLocal) {

}

Expand Down
12 changes: 12 additions & 0 deletions sample/src/main/java/org/example/packagea/ItemProcessor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.example.packagea;

import org.example.packageb.Item;

/**
* This is a link to {@link Item}.
*/
public class ItemProcessor {
public ItemProcessor(Item item) {

}
}
5 changes: 5 additions & 0 deletions sample/src/main/java/org/example/packageb/Item.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.example.packageb;

public class Item {
// an item
}
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

rootProject.name = 'xmldoclet'
include('xmldoclet', 'sample')
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void scan(DocTree tree) {

// Hack
if (!"constructor".equals(typeName())) {
attr.put("name", element.toString());
attr.put("name", element.getSimpleName().toString());
}

Map<String,DeclaredType> thrownTypes = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public void sample() {
"-docletpath", "build/classes/",
"-sourcepath", "../sample/src/main/java",
"org.example",
"org.example.packagea",
"org.example.packageb",
};

DocumentationTool docTool = ToolProvider.getSystemDocumentationTool();
Expand Down

0 comments on commit de4711a

Please sign in to comment.