manucapo / Gardener

A project to automatically generate plantUML sequence diagrams from java methods.
MIT License
3 stars 2 forks source link

Build a string from a list of parameter type names. #8

Open manucapo opened 2 years ago

manucapo commented 2 years ago

Currently information about the type of the parameters of a method is stored as a list of strings inside a custom data structure.

private List<String> parameterTypeNames; 

We need to use this list to build a single String that can be written to the plantUML file.

For example:

For a string list that contains the strings : {int int bool String}

We want to build a single string that looks like: (int, int, bool, String)

The goal is to make a java method that takes in a String list as parameter and returns the correct string.

eirinikrev commented 2 years ago

I would suggest something like that:

String change ="( "; For (object i : parameterTypeNames){ change = change + i.toString() } Return change + " )";

If you have to suggest any changes and/or additions I'll be happy to work on them.