scanpackages
Description
With this configuration parameter it is possible to set a list of packages names which classes should be part of the generated diagram text. It can be combined with a blacklist regular expression to filter out some classes inside these packages.
This configuration parameter can not be combined with the whitelist regular expression configuration parameter.
Example
Here is an example from the JUnit tests using this configuration parameter:
String result = getTestResultString();
String expectedDiagramText = IOUtils.toString(Objects.requireNonNull(classLoader.getResource("class/0006_different_packages.txt")),
StandardCharsets.UTF_8);
assertNotNull(result);
assertNotNull(expectedDiagramText);
assertEquals(expectedDiagramText.replaceAll("\\s+", ""), result.replaceAll("\\s+", ""));
which is rendered this way:
and produces this PlantUML diagram text:
@startuml
class de.elnarion.test.domain.t0006.pck1.ClassA {
}
class de.elnarion.test.domain.t0006.pck1.ClassB {
}
class de.elnarion.test.domain.t0006.pck2.ClassC {
}
de.elnarion.test.domain.t0006.pck1.ClassA --> de.elnarion.test.domain.t0006.pck1.ClassB : classB
de.elnarion.test.domain.t0006.pck1.ClassB --> de.elnarion.test.domain.t0006.pck2.ClassC : classc
@enduml