private boolean isInherited(Binder conditions, Reference ref, Contract refContract, Collection<Contract> contracts, int iteration) { if ((conditions == null) || (conditions.size() == 0)) return false; List<Object> condList = null; if (conditions.containsKey(all_of.name())) { condList = conditions.getList(all_of.name(), null); if (condList == null) throw new IllegalArgumentException("Expected all_of conditions"); } else if (conditions.containsKey(any_of.name())) { condList = conditions.getList(any_of.name(), null); if (condList == null) throw new IllegalArgumentException("Expected any_of conditions"); } else if (conditions.containsKey("operator")) return isInheritedParsed(conditions, ref, refContract, contracts, iteration); else throw new IllegalArgumentException("Expected all_of or any_of"); if (condList != null) for (Object item: condList) if (item.getClass().getName().endsWith("String")) { if (isInherited((String) item, ref, refContract, contracts, iteration)) return true; } else if (isInherited((Binder) item, ref, refContract, contracts, iteration)) return true; return false; }