public boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target, Audit audit) { try { return checkCompatibility(source, target, Compatibility.SUBSET, false, false, audit); } catch (IncompatibleInterfaceContractException e) { return false; } }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType, boolean byValue) { return isCompatible(source, target, compatibilityType, true, null); }
|| isCallbackCompatible(source, target, silent, audit); || target.getInterface().isDynamic()) { return ignoreCallback || isCallbackCompatible(source, target, silent, audit); Operation targetOperation = map(target.getInterface(), operation); if (targetOperation == null) { if (!silent) { if (audit == null) audit = new Audit(); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET, true, audit)) { audit.append("Operations called " + operation.getName()+ " are not compatible"); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; return ignoreCallback || isCallbackCompatible(source, target, silent, audit);
public boolean isCompatibleSubset(Interface source, Interface target) { if (source == target) { // Shortcut for performance return true; } if (source == null || target == null) { return false; } if (source.isDynamic() || target.isDynamic()) { return true; } if (source.isRemotable() != target.isRemotable()) { return false; } for (Operation operation : source.getOperations()) { Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; } if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; } } return true; }
/** * Check that two interface contracts are equal. The contracts are equal if the two contracts have the * same set of operations, with each operation having the same signature, both for forward and callback * interfaces * @param source * @param target * @return */ public boolean isMutuallyCompatible(InterfaceContract source, InterfaceContract target) { ExtensionType ext = source.getInterface().getExtensionType(); InterfaceContract sourceContract = null; // Are the forward interfaces equal? if (isMutuallyCompatible(source.getInterface(), target.getInterface())) { // Is there a Callback interface? if (source.getCallbackInterface() == null && target.getCallbackInterface() == null) { return true; } else { if (isMutuallyCompatible(source.getCallbackInterface(), target.getCallbackInterface())) { return true; } // end if } // end if } // end if return false; } // end method isEqual
getOperation(target.getCallbackInterface().getOperations(), operation.getName()); if (targetOperation == null) { if (!silent) {
|| isCallbackCompatible(source, target, silent, audit); || target.getInterface().isDynamic()) { return ignoreCallback || isCallbackCompatible(source, target, silent, audit); Operation targetOperation = map(target.getInterface(), operation); if (targetOperation == null) { if (!silent) { if (audit == null) audit = new Audit(); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET, true, audit)) { audit.append("Operations called " + operation.getName()+ " are not compatible"); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; return ignoreCallback || isCallbackCompatible(source, target, silent, audit);
public boolean isCompatibleSubset(Interface source, Interface target) { if (source == target) { // Shortcut for performance return true; } if (source == null || target == null) { return false; } if (source.isDynamic() || target.isDynamic()) { return true; } if (source.isRemotable() != target.isRemotable()) { return false; } for (Operation operation : source.getOperations()) { Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; } if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; } } return true; }
/** * Check that two interface contracts are equal. The contracts are equal if the two contracts have the * same set of operations, with each operation having the same signature, both for forward and callback * interfaces * @param source * @param target * @return */ public boolean isMutuallyCompatible(InterfaceContract source, InterfaceContract target) { ExtensionType ext = source.getInterface().getExtensionType(); InterfaceContract sourceContract = null; // Are the forward interfaces equal? if (isMutuallyCompatible(source.getInterface(), target.getInterface())) { // Is there a Callback interface? if (source.getCallbackInterface() == null && target.getCallbackInterface() == null) { return true; } else { if (isMutuallyCompatible(source.getCallbackInterface(), target.getCallbackInterface())) { return true; } // end if } // end if } // end if return false; } // end method isEqual
getOperation(target.getCallbackInterface().getOperations(), operation.getName()); if (targetOperation == null) { if (!silent) {
public boolean isCompatibleByReference(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, false); }
Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;
public boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target) { try { return checkCompatibility(source, target, Compatibility.SUBSET, false, false); } catch (IncompatibleInterfaceContractException e) { return false; } }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, true); }
Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;
public boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target, Audit audit) { try { return checkCompatibility(source, target, Compatibility.SUBSET, false, false, audit); } catch (IncompatibleInterfaceContractException e) { return false; } }
public boolean isCompatible(DataType source, DataType target, boolean passByValue) { return isCompatible(source, target, passByValue, null); }
public boolean isCompatibleSubset(InterfaceContract source, InterfaceContract target) { try { return checkCompatibility(source, target, Compatibility.SUBSET, false, false); } catch (IncompatibleInterfaceContractException e) { return false; } }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType, boolean byValue) { return isCompatible(source, target, compatibilityType, true, null); }
public boolean checkCompatibility(InterfaceContract source, InterfaceContract target, Compatibility compatibility, boolean ignoreCallback, boolean silent) throws IncompatibleInterfaceContractException { // create dummy audit object. Audit audit = new Audit(); return checkCompatibility(source, target, compatibility, ignoreCallback, silent, audit); }