public static boolean isFunctionalInterface ( JvmGenericType type , IActionPrototypeProvider sarlSignatureProvider ) { if ( type != null && type . isInterface ( ) ) { final Map < ActionPrototype , JvmOperation > operations = new HashMap <> ( ) ; populateInterfaceElements ( type , operations , null , sarlSignatureProvider ) ; if ( operations . size ( ) == 1 ) { final JvmOperation op = operations . values ( ) . iterator ( ) . next ( ) ; return ! op . isStatic ( ) && ! op . isDefault ( ) ; } } return false ; }
Replies if the given type is a functional interface .