Hello, I spent several hours trying to find solutions based on substring and regex to convert java types (format on the screenshot) into PUML type, but without success. I gave you some examples in the screenshot, the input being the representation of the type in java and the expected output the representation of the type in PUML. Thanks in advance for your help !
#Search for a suitable regex to convert a java type to PUML
10 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @deep cedar! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
String, not java.lang.String
well, generics would kind of be a problem
what exactly is PUML anyways?
mind supplying any further information on the format you'd like to convert the object-type-names to?
from what I can see, you'd have to check
is void? -> return representation of void
is collection (array of some sort?) -> return array element type with array suffix
is plain old java object? -> return name, without package
note that this is just my assumption, given that you didnt really specify the format you'd like
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.