public static ContextResources parse(String value) {
    if (value == null) {
      throw new UnsupportedOperationException(value);
    }

    ContextResources[] cr = ContextResources.values();
    for (ContextResources contextResources : cr) {
      if (contextResources.getIntelUri().equals(value)) {
        return contextResources;
      }
    }
    throw new UnsupportedOperationException(value);
  }
  public static ContextResources url(Object value) {
    if (value == null) {
      throw new UnsupportedOperationException();
    }

    ContextResources[] cr = ContextResources.values();
    Class<? extends Object> class1 = value.getClass();
    for (ContextResources contextResources : cr) {
      if (contextResources.getType().isAssignableFrom(class1)) {
        return contextResources;
      }
    }
    throw new UnsupportedOperationException(class1.getCanonicalName());
  }