class AbstractEncryptionBackend {

    public static AbstractEncryptionBackend getInstance() {
        String className = AppSettings.getInstance().getString(AppSettings.ENCRYPTION_BACKEND);
        if (instance == null || !className.equals(instance.getClass().getCanonicalName())) {
            instance = (AbstractEncryptionBackend) InstanceUtils.invokeConstructor(className);
        }
        return instance;
    }

}