hideMethodName

Description

With the help of this configuration parameter it is possible to hide/remove the method names from the sequence diagram because they are show as default.

Default value

The default value of this configuration parameter is false.

Example

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

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

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

// ASSERT
assertAll(() -> assertNotNull(generatedDiagram), () -> assertEquals(expectedDiagramText.replaceAll("\\s+", ""),
		generatedDiagram.replaceAll("\\s+", "")));
1 activate "hide method name" toggle

which is rendered this way:

0003_jpa_test_with_ignore_jpa_entities_and_hide_method_names_diagram

and produces this PlantUML diagram text:

@startuml

participant MovieService
participant MovieDAO
participant EntityManager
participant EntityTransaction

activate MovieService
	MovieService -> MovieDAO
	activate MovieDAO
		MovieDAO -> MovieDAO
		activate MovieDAO
			MovieDAO --> MovieDAO
		deactivate MovieDAO
		MovieDAO -> EntityManager
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityManager
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO --> MovieService
	deactivate MovieDAO
	MovieService -> MovieDAO
	activate MovieDAO
		MovieDAO -> MovieDAO
		activate MovieDAO
			MovieDAO --> MovieDAO
		deactivate MovieDAO
		MovieDAO -> EntityManager
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityTransaction
		activate EntityTransaction
			EntityTransaction --> MovieDAO
		deactivate EntityTransaction
		MovieDAO -> EntityManager
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityManager
		activate EntityManager
			EntityManager --> MovieDAO
		deactivate EntityManager
		MovieDAO -> EntityTransaction
		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_with_ignore_jpa_entities_diagram