fieldClassifierToIgnore
Description
With this configuration list option you can filter out fields by their classifier from the diagram.
You can add any of the following values to the configuration list:
-
ABSTRACT - all abstract non-static fields are filtered out
-
STATIC - all static non-abstract fields are filtered out
-
ABSTRACT_STATIC - all static abstract fields are filtered out
-
NONE - all fields without abstract or static classifier are filtered out
Default value
The default value of this configuration option is an empty list (no filtering via classifier).
Example
In the following example there are three dependencies in the maven dependency hierarchy which build the classpath for all further generation:
<dependencies>
<dependency>
<groupId>de.elnarion.util</groupId>
<artifactId>plantuml-generator-util</artifactId>
<version>@project.version@</version>
<classifier>tests</classifier>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
From this classpath all classes of the package "de.elnarion.test.domain.t0019", which are also used by the JUnit-tests of the PlantUML generator utility, should be generated as class diagram with the following plugin configuration
<plugin>
<artifactId>plantuml-generator-maven-plugin</artifactId>
<groupId>de.elnarion.maven</groupId>
<version>@project.version@</version>
<executions>
<execution>
<id>generate-simple-diagram</id>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<outputFilename>testdiagram1.txt</outputFilename>
<scanPackages>
<scanPackage>de.elnarion.test.domain.t0019</scanPackage>
</scanPackages>
<fieldClassifierListToIgnore>
<fieldClassifierListToIgnore>STATIC</fieldClassifierListToIgnore>
</fieldClassifierListToIgnore>
</configuration>
</execution>
</executions>
</plugin>
where all static fields are ignored and which is rendered this way:
and produces this PlantUML diagram text:
@startuml
abstract class de.elnarion.test.domain.t0019.Testclass {
{field} +test10 : String
{field} -test2 : String
{field} -test3 : String
{field} #test4 : String
{field} #test6 : String
{field} #test7 : String
{field} +test9 : String
}
@enduml