code: static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException {
          // See if the prerequisites are met
          for (final String required : condition.getRequires()) {
              if (!target.isApplied(required)) {
                  throw PatchLogger.ROOT_LOGGER.requiresPatch(required);
              }
          }
          // Check for incompatibilities
          for (final String incompatible : condition.getIncompatibleWith()) {
              if (target.isApplied(incompatible)) {
                  throw PatchLogger.ROOT_LOGGER.incompatiblePatch(incompatible);
              }
          }
      }
docs: Check whether the patch can be applied to a given target.
  
  @param condition the conditions
  @param target    the target
  @throws PatchingException