public interface TypeCompatibilityHandlerInterface
This interface allows to implement compatibility features of a plug-in with its
former versions.
Example code:
public class MyTypeCompatibilityHandler implements TypeCompatibilityHandlerInterface {
public Class<?> convertType(String classType, String pluginID, VersionNumber version) {
if(classType.equals("mypackage.DeprecatedClass")) {
return SubstituteClass.class;
}
return null;
}
}
- Since:
- Omix 1.3.11
- Author:
- Dr. Peter Droste, Omix Visualization
-
Method Summary
Modifier and Type Method Description Class<?>
convertType(String classType, String pluginID, VersionNumber version)
Converts a deprecated class type name into a substituted class of the current plug-in version.
-
Method Details
-
convertType
Converts a deprecated class type name into a substituted class of the current plug-in version. Omix iterates the list of installed TypeCompatibilityHandlers ordered by time of installation. If one handler converts the deprecated class name successfully into a class object all other existing TypeCompatibilityHandlers are skipped.- Parameters:
classType
- deprecated class namepluginID
- ID of the plug-in using the classTypeversion
- of the plug-in using the classType- Returns:
- substituted class
-