private String getExistingParentPropName()

in src/com/vmware/vim/cf/ManagedObjectCache.java [121:143]


    private String getExistingParentPropName(Map<String, Object> moMap, String propName)
    {
      //remove everything after the first "["
      int pos = propName.indexOf("[");
      if(pos != -1)
      {
        propName = propName.substring(0, pos);
      }
      
      while(true)
      {
        int lastDot = propName.lastIndexOf(".");
        if(lastDot==-1)
        {
          return null;
        }
        propName = propName.substring(0, lastDot);
        if(moMap.containsKey(propName))
        {
          return propName;
        }
      }
    }