code: private static ObjectName getObjectName(Cache<?, ?> cache, MBeanType type) {
      String cacheManagerName = sanitize(cache.getCacheManager().getURI().toString());
      String cacheName = sanitize(cache.getName());
  
      try {
        String name = String.format("javax.cache:type=Cache%s,CacheManager=%s,Cache=%s",
            type, cacheManagerName, cacheName);
        return new ObjectName(name);
      } catch (MalformedObjectNameException e) {
        String msg = String.format("Illegal ObjectName for cacheManager=[%s], cache=[%s]",
            cacheManagerName, cacheName);
        throw new CacheException(msg, e);
      }
    }
docs: Returns the object name of the management bean.