ignoreStandardClasses

Description

With the help of this configuration parameter it is possible to remove all Java standard classes (java.* package names) from the call sequence. Because this is normal wanted behavior this toggle is activated by default. If you want the standard classes in the diagram, you must deactivate it.

Default value

The default value of this configuration is true (all standard java classes are ignored).

Example

Here is an example from the JUnit tests using this configuration parameter:

// ARRANGE
PlantUMLSequenceDiagramConfigBuilder builder = new PlantUMLSequenceDiagramConfigBuilder(
		classUnderTest.getName(), "doSomeBusiness").withIgnoreStandardClasses(false); (1)
PlantUMLSequenceDiagramGenerator generator = new PlantUMLSequenceDiagramGenerator(builder.build());
String expectedDiagramText = IOUtils.toString(
		Objects.requireNonNull(classLoader.getResource("sequence/0003_jpa_test_with_standard_classes.txt")), StandardCharsets.UTF_8);

// ACT
String generatedDiagram = generator.generateDiagramText();

// ASSERT
assertAll(() -> assertNotNull(generatedDiagram), () -> assertEquals(expectedDiagramText.replaceAll("\\s+", ""),
		generatedDiagram.replaceAll("\\s+", "")));
1 deactivate "standard classes" toggle

which is rendered this way:

0003_jpa_test_with_standard_classes_diagram

and produces this PlantUML diagram text:

@startuml

participant MovieService
participant Long
participant MovieDAO
participant EntityManager
participant Movie
participant EntityTransaction

activate MovieService
	MovieService -> Long : valueOf
	activate Long
		Long --> MovieService
	deactivate Long
	MovieService -> MovieDAO : getMovie
	activate MovieDAO
		MovieDAO -> MovieDAO : getEntityManager
		activate MovieDAO
			MovieDAO --> MovieDAO
		deactivate MovieDAO
		MovieDAO -> Long : longValue
		activate Long
			Long --> MovieDAO
		deactivate Long
		MovieDAO -> Long : valueOf
		activate Long
			Long --> MovieDAO
		deactivate Long
		MovieDAO -> EntityManager : find
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityManager : detach
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO --> MovieService
	deactivate MovieDAO
	MovieService -> Movie : setMovieName
	activate Movie
		Movie --> MovieService
	deactivate Movie
	MovieService -> MovieDAO : saveMovie
	activate MovieDAO
		MovieDAO -> MovieDAO : getEntityManager
		activate MovieDAO
			MovieDAO --> MovieDAO
		deactivate MovieDAO
		MovieDAO -> EntityManager : getTransaction
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityTransaction : begin
		activate EntityTransaction
			EntityTransaction --> MovieDAO
		deactivate EntityTransaction
		MovieDAO -> EntityManager : persist
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityManager : getTransaction
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityTransaction : commit
		activate EntityTransaction
			EntityTransaction --> MovieDAO
		deactivate EntityTransaction
		MovieDAO --> MovieService
	deactivate MovieDAO
deactivate MovieService

@enduml

Without the parameter the diagram would look like this:

0003_jpa_test_without_options_diagram