(Class<T> type, Class<?> R_Classs, String... excepts)
| 330 | private HashSet<String> hashSet = new HashSet<>(); |
| 331 | |
| 332 | public <T> void loadFolderExcept(Class<T> type, Class<?> R_Classs, String... excepts) { |
| 333 | for (String name : excepts) { |
| 334 | hashSet.add(name); |
| 335 | } |
| 336 | Class innerClazz[] = R_Classs.getDeclaredClasses(); |
| 337 | if (innerClazz.length > 0) loadFolderToPack(innerClazz); |
| 338 | Field[] fields = R_Classs.getDeclaredFields(); |
| 339 | for (Field field : fields) { |
| 340 | if (field.getModifiers() == 9) { |
| 341 | try { |
| 342 | String path = (String) field.get(null); |
| 343 | if (!hashSet.contains(path)) { |
| 344 | load(type, path); |
| 345 | } |
| 346 | } catch (IllegalAccessException e) { |
| 347 | e.printStackTrace(); |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | hashSet.clear(); |
| 352 | } |
| 353 | |
| 354 | /** |
| 355 | * 加载文件夹里的图片并合成到大图,自动排除非jpg和png资源以及排除参数指定的任意资源 |
nothing calls this directly
no test coverage detected