Moved class (extension point)
Sometimes it's desirable to rename the Java class or move it to another package/plugin. Usually this operation can be easily performed via IDE refactoring tools. However some classes are referred from the configuration files, collections and so on and it's quite hard to replace all old name occurences on all the living servers.
Usually the classes are loaded via
CollectionFactory.loadClass methods or using the ClassLoader returned by
CollectionFactory.getClassLoader which actually also uses
loadClass method. Thus these methods were changed to allow loading the moved classes by their old names if old names were properly registered via this extension point.
<!ELEMENT class> <!ATTLIST class name CDATA #REQUIRED oldNames CDATA #REQUIRED >
- Current name of the class
- Comma-separated list of old names the class had
- If the class was moved to another plugin, this extension must be registered in the plugin the class is located now.
- It's still preferred to change all configuration files where class name occurs. Use this extension point only if replacing the class name in all the files is hard or impossible. And even if you use this extension point, try to use new class name in as many places as possible.
<extension point="ru.biosoft.access.movedClass"> <class name="ru.biosoft.bsa.AnnotatedSequence" oldNames="ru.biosoft.bsa.Map"/> </extension>
This example informs BioUML that former class
ru.biosoft.bsa.Map was moved to