gboersma / uml-java-doclet Goto Github PK
View Code? Open in Web Editor NEWDoclet to generate UML diagrams for Javadoc using PlantUML.
Doclet to generate UML diagrams for Javadoc using PlantUML.
Generics embedded within generic parameters are not represented well across all diagrams:
List<Optional<String>>
shows up as List<Optional>
.List<Optional<MyClass>>
will not show a uses relationship with MyClass
.Hi,
Can we generate the javadoc in custom location instead of the default location target/site/apidocs.
What do I need to apply it in gradle?
hi
i try to exclude some classes from appearing in the Diagram,depending on which annotation it has, and this could be solvedby creating function and call this function many times in deferant files
(ModelPackage.java,ontextDiagramPrinter.java,Model.java,ModelClass.java) and it works.
but in other hand i would like to do the same job using pom.xml parameters but unfortunately it didnt works please help me if you have an idea.
you could also check my work
Thanks
https://github.com/feras-om/uml-java-doclet/tree/master/src/main/java/info/leadinglight/umljavadoclet
Relationships from an outer class to an inner class are not shown on the diagrams. Add them to improve navigation between classes.
Hi
Do you have plans to upload to maven central? If so, the coordinates will stay the same?
Regards
When using some generics I get following error when viewing the generated javadoc TestGenerics.MyModelBuilder page;
... (skipping 12 lines) ...class "<b><size:14>TestGenerics.AbstractBuilder<P, MyModel, MyModelBuilder></b>\n<size:10>info.leadinglight.umljavadoclet" as info.leadinglight.umljavadoclet.TestGenerics.AbstractBuilderObjectTestGenerics.MyModelTestGenerics.MyModelBuilder<P>{}hide info.leadinglight.umljavadoclet.TestGenerics.AbstractBuilderObjectTestGenerics.MyModelTestGenerics.MyModelBuilder<P> fieldsSyntax Error?
Created a test model;
`package info.leadinglight.umljavadoclet;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
public class TestGenerics {
Map<String,MyModel> result = new HashMap<>();
public static void main(String[] argu[]) {
new TestGenerics().createValue("1").setValue("1VAL").build().createValue("2").setValue("2VAL").build().extendValue("1").setValue("1WAL-Override").build();
}
public MyModelBuilder<TestGenerics> createValue(String key) {
return new MyModelBuilder<>(this, new MyModel(), (p,v) -> p.result.put(v.key, v)).setKey(key);
}
public MyModelBuilder<TestGenerics> extendValue(String key) {
return new MyModelBuilder<>(this, result.get(key), (p,v) -> {});
}
public class MyModel {
String key;
String value;
}
public interface Builder<T> {
T build();
}
/**
* Abstract object builder with parent builder.
*
* @param <P> The parent builder.
* @param <T> The object to build.
* @param <B> The current builder.
*/
abstract public class AbstractBuilder<P, T, B> implements Builder<P> {
private final P parent;
private final T value;
private final BiConsumer<P, T> parentBuilder;
public AbstractBuilder(P parent, T value, BiConsumer<P, T> parentBuilder) {
this.parent = parent;
this.value = value;
this.parentBuilder = parentBuilder;
}
@Override
public final P build() {
parentBuilder.accept(parent, value);
return parent;
}
protected final B make(Consumer<T> mixer) {
mixer.accept(value);
return (B) this;
}
}
public class MyModelBuilder<P> extends AbstractBuilder<P,MyModel,MyModelBuilder<P>> {
public MyModelBuilder(P parent, MyModel value, BiConsumer<P, MyModel> parentBuilder) {
super(parent, value, parentBuilder);
}
protected MyModelBuilder<P> setKey(String key) {
return make(v -> v.key=key);
}
public MyModelBuilder<P> setValue(String value) {
return make(v -> v.value=value);
}
}
}
`
When put in src./test/java/..... and run javadoc:test-javadoc to have test case.
I'm trying to generate documentation and gets error with version 1.0.0 published on the Central:
javadoc: error - In doclet class info.leadinglight.umljavadoclet.UmlJavaDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at info.leadinglight.umljavadoclet.model.ModelPackage.parentPackageFullName(ModelPackage.java:62)
at info.leadinglight.umljavadoclet.model.Model.isRootPackage(Model.java:87)
at info.leadinglight.umljavadoclet.model.Model.rootPackages(Model.java:75)
at info.leadinglight.umljavadoclet.printer.OverviewDiagramPrinter.generate(OverviewDiagramPrinter.java:20)
at info.leadinglight.umljavadoclet.UmlJavaDoclet.generateOverviewDiagram(UmlJavaDoclet.java:173)
at info.leadinglight.umljavadoclet.UmlJavaDoclet.start(UmlJavaDoclet.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
at com.sun.tools.javadoc.Start.begin(Start.java:219)
at com.sun.tools.javadoc.Start.begin(Start.java:205)
at com.sun.tools.javadoc.Main.execute(Main.java:64)
at com.sun.tools.javadoc.Main.main(Main.java:54)
Would it be possible to include a puml file with default settings regarding the looks of the generated diagram within the generated puml. See http://plantuml.com/preprocessing
In Java 9, the doclet tool was completely reworked and is not backwards compatible with version 8-.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.