(String result)
| 223 | } |
| 224 | |
| 225 | private boolean isPackage(String result) { |
| 226 | if (result.equals(targetClassName) || result.startsWith(targetClassName + '$')) { |
| 227 | return false; |
| 228 | } |
| 229 | /* |
| 230 | * This might look heavy-weight but, with only the ClassLoader API available, trying to load the |
| 231 | * resource as a class is the only reliable way found so far to differentiate between a class and a |
| 232 | * package. Other options, such as getResource(), fail for some edge cases on case insensitive file |
| 233 | * systems. As this code is only called at compile time, the performance impact is not a significant |
| 234 | * concern. |
| 235 | */ |
| 236 | try { |
| 237 | classLoader.loadClass(result); |
| 238 | } catch (Throwable t) { |
| 239 | ExceptionUtils.handleThrowable(t); |
| 240 | return true; |
| 241 | } |
| 242 | return false; |
| 243 | } |
| 244 | |
| 245 | @Override |
| 246 | public boolean isPackage(char[][] parentPackageName, char[] packageName) { |
nothing calls this directly
no test coverage detected