use of org.infinispan.configuration.cache.CustomStoreConfiguration in project infinispan by infinispan.
the class PersistenceUtil method getClassBasedOnConfigurationAnnotation.
private static Class<?> getClassBasedOnConfigurationAnnotation(StoreConfiguration cfg) {
ConfigurationFor annotation = cfg.getClass().getAnnotation(ConfigurationFor.class);
Class<?> classAnnotation = null;
if (annotation == null) {
if (cfg instanceof CustomStoreConfiguration) {
classAnnotation = ((CustomStoreConfiguration) cfg).customStoreClass();
}
} else {
classAnnotation = annotation.value();
}
if (classAnnotation == null) {
throw CONFIG.loaderConfigurationDoesNotSpecifyLoaderClass(cfg.getClass().getName());
}
return classAnnotation;
}
Aggregations