Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structurizr doesn't add a relationship between two components on pure generic usage #81

Closed
Zaijo opened this issue Mar 12, 2018 · 4 comments

Comments

@Zaijo
Copy link
Contributor

Zaijo commented Mar 12, 2018

Hello,
I have an IndexController mentioning a class Item only in this form

private PageImpl<Item> createPageable(Pageable pageable)

Such mention is not sufficient to create a link in a diagram. On the other hand, adding a field of type Item works just fine.

Is there any known way how to solve this issue?

@simonbrowndotje
Copy link
Contributor

Unfortunately not. The current implementations of the component finders use reflection, and Java's generic type erasure means this information isn't present in the byetcode. Something I do have planned for the future is to look at how jQAssistant works, and perhaps using that as the type repository implementation.

@Zaijo
Copy link
Contributor Author

Zaijo commented Mar 12, 2018

Well. Thanks!

And what would be the least intrusive method of making that link appear in diagram? Any ideas?

@Zaijo
Copy link
Contributor Author

Zaijo commented Mar 13, 2018

Adding an unused field would not pass out checkstyle, maybe a structurizr annotation?

@simonbrowndotje
Copy link
Contributor

What is the Item class? Is it really a "component", or is just a Java class (e.g. a POJO) used by the IndexController component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants