[jboss-dev-forums] [JBoss Microcontainer Development] - Re: ModifierInfo: enum or interface?
flavia.rainone@jboss.com
do-not-reply at jboss.com
Fri Oct 9 07:28:12 EDT 2009
"alesj" wrote : "flavia.rainone at jboss.com" wrote :
| | Before I try to fix it, I need to know if we are going to stick with ModifierInfo enum or with ModifierInfo interface.
| |
| If the fix for this is to revert it back to ModifierInfo as an interface,
| then that's exactly what I would do.
|
There are two possible fixes: reverting or updating dependencies such as the one in org.jboss.xb.builder.runtime.CollectionPropertyHandler.
On one hand, updating all dependencies at this point may be too much hassle. Plus, the fix I added to getNewModifier method can generate unnecessary overhead. This method is called everytime a new ClassInfo, MethodInfo, ConstructorInfo and FieldInfo is created, to fill in the modifier field.
On the other hand, the interface version has a drawback: it forces you to recalculate if it is static, for example, for as many times as method isStatic is called. But I don't know at what frequency the modifiers are checked, so I can't say how it compares to the overhead of getNewModifier method.
Given all that, I vote for reverting back to ModifierInfo interface.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259599#4259599
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259599
More information about the jboss-dev-forums
mailing list