我的项目中包含两个项目genxml
,framework1
并且framework2
. Framework2
是的更新版本,framework1
他们都有类AbstractScreenTest.class
。无论如何,在下面的代码中我可以指定我想与之交互的项目吗?
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(true);
provider.addIncludeFilter(new AssignableTypeFilter(AbstractScreenTest.class));
Set<BeanDefinition> components = provider.findCandidateComponents(candiatePackage);
for (BeanDefinition component : components){
cls = Class.forName(component.getBeanClassName());
classList.add(cls.getName().toString());
}