-
Notifications
You must be signed in to change notification settings - Fork 71
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
API to supersede components if not required #601
base: master
Are you sure you want to change the base?
API to supersede components if not required #601
Conversation
@@ -153,6 +153,10 @@ public ComponentCategory getCategory() { | |||
return ComponentCategory.UNCATEGORIZED; | |||
} | |||
|
|||
public Set<Class<? extends Component>> getSupersededComponents() { | |||
return Collections.emptySet(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or just
return Collections.emptySet(); | |
return Set.of(); |
@@ -153,6 +153,10 @@ public ComponentCategory getCategory() { | |||
return ComponentCategory.UNCATEGORIZED; | |||
} | |||
|
|||
public Set<Class<? extends Component>> getSupersededComponents() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs Javadoc.
for (Component component : components) { | ||
try { | ||
if (supersededComponents.contains(component.getClass())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of Class
in APIs is usually a bit of an antipattern since it makes assumptions about implementation hierarchies; and actually @Extension
is not strictly limited to singleton classes. Maybe a boolean supersedes(Component)
?
Added a way for components to supersede other components in the support bundle creation process