Java 使用org.reflections扫描具体包中的资源

Java 使用org.reflections扫描具体包中的资源,java,reflection,Java,Reflection,我正在使用查找包中的资源: new Reflections( "test", //package prefix new ResourcesScanner() ).getResources(x -> x.endsWith(".xml")) 在添加具有类似名称的包之前,它工作正常例如,它是唯一的包测试,并添加了包测试秒: | +-+-[test] | +--one.xml | +--two.xml | +-+-[test_second] +--three.xml +

我正在使用查找包中的资源:

new Reflections(
    "test", //package prefix
    new ResourcesScanner()
).getResources(x -> x.endsWith(".xml"))
在添加具有类似名称的包之前,它工作正常
例如,它是唯一的包
测试
,并添加了包
测试秒

| 
+-+-[test]
| +--one.xml
| +--two.xml
|
+-+-[test_second]
  +--three.xml
  +--four.xml
现在,当我尝试按前缀扫描它时,可以找到这两个包中的资源

问题:如何使用此库只扫描“test”包中的资源,而忽略所有其他带有“test”前缀的包