showReturnTypes

Description

With the help of this configuration parameter it is possible to show the type of the returned objects of a method call.

The shown types are displayed according to the use short class names toggle which is activated by default.

Default value

The default value of this configuration parameter is false (no return type shown).

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 the sequence diagram is generated, but here all return types are also shown in the diagram. This is similar to the JUnit-tests of the PlantUML generator utility:

			<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>generateSequenceDiagram</goal>
						</goals>
						<phase>generate-test-sources</phase>
						<configuration>
							<outputFilename>testsequencediagram1.txt</outputFilename>
							<startClass>de.elnarion.test.sequence.t0001.CallerA</startClass>
							<startMethod>callSomething</startMethod>
							<showReturnTypes>true</showReturnTypes>
						</configuration>
					</execution>
				</executions>
			</plugin>

which is rendered this way:

0001_basic_caller_test_with_return_types_diagram

and produces this PlantUML diagram text:

@startuml

participant CallerA
participant CallerB

activate CallerA
	CallerA -> CallerB : callSomething
	activate CallerB
		CallerB -> CallerB : privateMethodCall
		activate CallerB
			CallerB --> CallerB : void
		deactivate CallerB
		CallerB -> CallerB : protectedMethodCall
		activate CallerB
			CallerB --> CallerB : void
		deactivate CallerB
		CallerB --> CallerA : void
	deactivate CallerB
	CallerA -> CallerB : callSomethingElse
	activate CallerB
		CallerB --> CallerA : String
	deactivate CallerB
deactivate CallerA

@enduml

Without the parameter the diagram would look like this:

0001_basic_caller_test_diagram

If used with an activated use short class names toggle it looks like this:

0001_basic_caller_test_with_return_types_and_long_class_names_diagram