(Class<?> type)
| 381 | * Copied from org.apache.el.lang.ELSupport - keep in sync |
| 382 | */ |
| 383 | static boolean isFunctionalInterface(Class<?> type) { |
| 384 | |
| 385 | if (!type.isInterface()) { |
| 386 | return false; |
| 387 | } |
| 388 | |
| 389 | boolean foundAbstractMethod = false; |
| 390 | Method[] methods = type.getMethods(); |
| 391 | for (Method method : methods) { |
| 392 | if (Modifier.isAbstract(method.getModifiers())) { |
| 393 | // Abstract methods that override one of the public methods |
| 394 | // of Object don't count |
| 395 | if (overridesObjectMethod(method)) { |
| 396 | continue; |
| 397 | } |
| 398 | if (foundAbstractMethod) { |
| 399 | // Found more than one |
| 400 | return false; |
| 401 | } else { |
| 402 | foundAbstractMethod = true; |
| 403 | } |
| 404 | } |
| 405 | } |
| 406 | return foundAbstractMethod; |
| 407 | } |
| 408 | |
| 409 | |
| 410 | /* |
no test coverage detected