use of org.springframework.core.type.filter.AssignableTypeFilter in project spring-cloud-gcp by spring-cloud.
the class DatastorePersistentEntityImpl method initializeSubclassEntities.
private void initializeSubclassEntities() {
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);
provider.addIncludeFilter(new AssignableTypeFilter(getType()));
for (BeanDefinition component : provider.findCandidateComponents(getType().getPackage().getName())) {
try {
this.datastoreMappingContext.getPersistentEntity(Class.forName(component.getBeanClassName()));
} catch (ClassNotFoundException ex) {
throw new DatastoreDataException("Could not find expected subclass for this entity: " + getType(), ex);
}
}
}
Aggregations