/** * Check whether the specified interface is in the list of extended interfaces. * * @param interfac The interface that should be checked to see if it is in the list of exteneded interfaces. * @param extendedInterfaces An array of interfaces representing the list of extended interfaces. * @return true if the interface is in the list of extended interfaces, false otherwise. */ private boolean containsInterface(Interface interfac, Interface[] extendedInterfaces) { boolean foundInterface = false; int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces && !foundInterface; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) foundInterface = true; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces())) foundInterface = true; } return foundInterface; }
/** * Check whether the specified interface is in the list of extended interfaces. * * @param interfac The interface that should be checked to see if it is in the list of exteneded interfaces. * @param extendedInterfaces An array of interfaces representing the list of extended interfaces. * @return true if the interface is in the list of extended interfaces, false otherwise. */ private boolean containsInterface(Interface interfac, Interface[] extendedInterfaces) { boolean foundInterface = false; int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces && !foundInterface; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) foundInterface = true; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces())) foundInterface = true; } return foundInterface; }
/** * Helper method for testAssertionInterface0027. * Check whether the specified interface is in the array of provided * interfaces or in an array of interfaces one of the interfaces extends. * * @param interfac The interface to check for. * @param extendedInterfaces An array of extened interfaces to check for this interface. * @return The interface that is equal to or extends this interface, or null if the interface is not contained. */ private Interface containsInterface(Interface interfac, Interface[] extendedInterfaces) { int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) return extendedInterfaces[i]; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces()) != null) return extendedInterfaces[i]; } return null; }
/** * Helper method for testAssertionInterface0027. * Check whether the specified interface is in the array of provided * interfaces or in an array of interfaces one of the interfaces extends. * * @param interfac The interface to check for. * @param extendedInterfaces An array of extened interfaces to check for this interface. * @return The interface that is equal to or extends this interface, or null if the interface is not contained. */ private Interface containsInterface(Interface interfac, Interface[] extendedInterfaces) { int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) return extendedInterfaces[i]; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces()) != null) return extendedInterfaces[i]; } return null; }
if(serviceInterface != null && bindingInterface != null && !serviceInterface.isEquivalentTo(bindingInterface))
if(serviceInterface != null && bindingInterface != null && !serviceInterface.isEquivalentTo(bindingInterface))