8000 Add convenience methods to create BuildingBlockDescriptor for default cases · Issue #5 · archifacts/archifacts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add convenience methods to create BuildingBlockDescriptor for default cases #5

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

Closed
nils-christian opened this issue Aug 7, 2021 · 1 comment · Fixed by #23
Closed
Labels
clarification-needed Needs to be discussed before implementation enhancement New feature or request

Comments

@nils-christian
Copy link
Contributor

This is certainly always a difficult topic, but it would be nice to have some convenience methods to create BuildingBlockDescriptors for some default cases. While writing descriptors for my application I noticed that I can reduce most of them to three cases:

  • JavaClass ends with a certain name
  • JavaClass is assignable to a certain class
  • JavaClass is annotated with a certain annotation

I wrote the methods as part of a helper class, but they could (theoretically) be part of the BuildingBlockDescriptor interface as well.

applicationBuilder.addBuildingBlockDescriptor( BuildingBlockDescriptorHelper.forAssignableTo( BuildingBlockType.of( "Repository" ), Repository.class ) );
applicationBuilder.addBuildingBlockDescriptor( BuildingBlockDescriptorHelper.forSimpleNameEndingWith( BuildingBlockType.of( "Projection" ), "Projection" ) );
@nils-christian
Copy link
Contributor Author

I made a suggestion for this issue in form of a PR (#23).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification-needed Needs to be discussed before implementation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0