Why not allowing sub-classing of BpmnParse?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2011 07:31 AM
Hi,
The constructor of BpmnParse class is defined as package level.
Thus, extending isn't possible because the sub-class can't call the constructor of the parent.
Here's the constructor from Activiti code:
Is this intentional (to disallow extensions)? Why?
The constructor of BpmnParse class is defined as package level.
Thus, extending isn't possible because the sub-class can't call the constructor of the parent.
Here's the constructor from Activiti code:
/** * Constructor to be called by the {@link BpmnParser}. * * Note the package modifier here: only the {@link BpmnParser} is allowed to create instances. */ BpmnParse(BpmnParser parser) { super(parser); ….. ….. }
Is this intentional (to disallow extensions)? Why?
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2011 03:28 AM
I remember that I implemented it specifically that way, thinking that extensions to the parser should be done through other extension points.
But indeed, there is actually very little reason to do so. Could you elaborate which kind of extension you would like to do?
But indeed, there is actually very little reason to do so. Could you elaborate which kind of extension you would like to do?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2011 06:22 AM
We've been through why I'm extending the parser before, check this thread:
http://forums.activiti.org/en/viewtopic.php?f=4&t=371
What I want to have, is similar to "activiti:" extensions to the BPMN, related to my own domain of usage.
Actually I proposed to refactor the BPMN parser in a better designed way (object-oriented design) rather than the current, straight and function-call-based, so that the parser code in the Activiti project can become somewhat cleaner, and "activiti:" extensions (and other extensions) can be treated the same way, and allow other users (like me) to add their own extensions. The ParseListener class does not provide the type of extensibility I need, as specified in the comments of ACT-178.
Anyway, I filled the contributor agreement form so that I can provide patches for you guys to look at, and tell me if my refactoring is something you like or not. I followed it up several times, and got no answer. Not even a "No, we don't want you to contribute" answer.
As a result, I am re-writing the whole parser class every time I upgrade my version of Activiti. For the sake of minimizing my re-coding, I wanted to extend the BpmnParse class instead of re-writing it to replace some method by overriding them, which I found out that this is not possible either.
-Hamed
http://forums.activiti.org/en/viewtopic.php?f=4&t=371
What I want to have, is similar to "activiti:" extensions to the BPMN, related to my own domain of usage.
Actually I proposed to refactor the BPMN parser in a better designed way (object-oriented design) rather than the current, straight and function-call-based, so that the parser code in the Activiti project can become somewhat cleaner, and "activiti:" extensions (and other extensions) can be treated the same way, and allow other users (like me) to add their own extensions. The ParseListener class does not provide the type of extensibility I need, as specified in the comments of ACT-178.
Anyway, I filled the contributor agreement form so that I can provide patches for you guys to look at, and tell me if my refactoring is something you like or not. I followed it up several times, and got no answer. Not even a "No, we don't want you to contribute" answer.
As a result, I am re-writing the whole parser class every time I upgrade my version of Activiti. For the sake of minimizing my re-coding, I wanted to extend the BpmnParse class instead of re-writing it to replace some method by overriding them, which I found out that this is not possible either.
-Hamed
