try {
FlippingStrategy flipStrategy = (FlippingStrategy) Class.forName(strategy).newInstance();
flipStrategy.init(featUid, ParameterUtils.toMap((String) dbObject.get(EXPRESSION)));
return flipStrategy;
} catch (InstantiationException ie) {
throw new FeatureAccessException("Cannot instantiate Strategy, no default constructor available", ie);
} catch (IllegalAccessException iae) {
throw new FeatureAccessException("Cannot instantiate Strategy, no visible constructor", iae);
} catch (ClassNotFoundException e) {
throw new FeatureAccessException("Cannot instantiate Strategy, classNotFound", e);
}
}
return (FlippingStrategy) dbObject.get(STRATEGY);
}