In preparing HexGridNumberingX for automated import to VASSAL modules, I spotted what I believe to be an implemenatation mistake through-out much of VASSAL. Whereas the Configurable i/f defines the method getConfigureName(), which is defined in AbstractConfigurable, most of the implementing classes and their invokers seem to be instead using the method getConfigureTypeName(). This is pervasive. Am I correct, or am I missing some subtlety in the definitions?
They serve different functions. getConfigureTypeName returns a constant that
describes the type of component. getConfigureName returns the user-settable
name of the component and probably shouldn’t be overridden.
In preparing HexGridNumberingX for automated import to VASSAL modules, I
spotted what I believe to be an implemenatation mistake through-out much
of VASSAL. Whereas the Configurable i/f defines the method
getConfigureName(), which is defined in AbstractConfigurable, most of
the implementing classes and their invokers seem to be instead using the
method getConfigureTypeName(). This is pervasive. Am I correct, or am I
missing some subtlety in the definitions?
Should getConfigureTypeName() be added to Configurable and AbstractConfigurable then? It seems to be a necessary requirement for successful invocation of the Configurable i/f.
As far as I can tell, getConfigureTypeName() is only ever called by
getComponentTypeName(), which in turn is only ever used to detect infinite
loops. It is therefore declared in the RecursionLimiter.Loopable interface.
So the answer is mostly no. If anything, it’s just kind of named badly.
Should getConfigureTypeName() be added to Configurable and
AbstractConfigurable then? It seems to be a necessary requirement for
successful invocation of the Configurable i/f.
But if implementation of i/f Configurable is defined as the necessary and sufficient condition to be ‘configurable’, and implementing getConfigureTypeName() is a necessary condition to be ‘configured’, then ipso facto getConfigureTypeName() seems to belong in, or in a super-class of, i/f Configurable (or at least of abstract class AbstractConfigurable).
But if implementation of i/f Configurable is defined as the necessary
and sufficient condition to be ‘configurable’, and implementing
getConfigureTypeName() is a necessary condition to be ‘configured’, then
ipso facto getConfigureTypeName() seems to belong in, or in a
super-class of, i/f Configurable (or at least of abstract class
AbstractConfigurable).