question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generic type support for class diagrams

See original GitHub issue

I want to be able to define a generic class in class diagrams. This currently breaks because the parser doesn’t allow < or > in the class name.

classDiagram
class Test<T> {
+ test: int
}

Live editor example

If this syntax would break something, there could be an alternative syntax

classDiagram
class Test{T} {
+ test: int
}

This should render with < > brackets. Needs more work because this means additional parsing.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
klemmchrcommented, Nov 19, 2019

Looks like the grammar in flow.jison will need to be added to.

This issue is about class diagrams, not flow diagrams.

2reactions
keenanjt33commented, Nov 19, 2019

New contributor here! I’m interested in taking this on. Looks like the grammar in classDiagram.jison will need to be added to.

Edit: originally incorrectly referred to flow.json

Read more comments on GitHub >

github_iconTop Results From Across the Web

UML Class Diagram and Generics - java - Stack Overflow
I'm looking for two things really: One is how do I model generic java classes if i were doing it with pen and...
Read more >
Defining Generics with UML Templates - Eclipse
The kinds of UML metatypes that can be templateable are Classifier (Class, Component etc.), Operation, Package and less commonly, Property, and StringExpression ...
Read more >
Generics - No Magic Documentation
Generics permit classes, structs, interfaces, delegates, and methods to be parameterized by the data types they store and manipulate.
Read more >
UML class diagram , How can i draw generic method with type ...
Hello everybody, I would like to draw this code to class diagram public interface IDataContext { IList GetAll() where T : class, new();...
Read more >
Generic classes in the class diagram - ResearchGate
In BlueJ, generic types are supported explicitly at all stages of interaction. When a generic class is instantiated, the constructor dialogue includes an ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found