plantuml-parser
plantuml-parser copied to clipboard
Displaying default constructors
I would like to display the default constructors in the diagram, as well, for the consistency. If you agree, I can try to add the feature.
Is there an example to illustrate this function? Currently, constructors are supported.
Yes, so for example, in ExampleConstructor class, if I don't explicitly declare public ExampleConstructor(), <<Create>> ExampleConstructor() does not show up in the diagram.
I compared with two different source code, one with the declaration of the constructor and one without it.
package example;
public class ExampleClass {
}
package example;
public class ExampleClassWithConstructor {
public ExampleClassWithConstructor() {
}
}
The diagram output is like this.
@startuml
class example.ExampleClass {
}
class example.ExampleClassWithConstructor {
+ <<Create>> ExampleClassWithConstructor()
}
@enduml
Here is the link describing a default constructor. https://www.scaler.com/topics/default-constructor-in-java/
Ok, but please make it optional. eg: https://github.com/shuzijun/plantuml-parser/blob/422af2d91c620aabaed076b3d512add43ababb28/plantuml-parser-core/src/main/java/com/shuzijun/plantumlparser/core/ParserConfig.java#LL34C21-L34C37