code: @SuppressWarnings("unchecked")
  	public static void registerPattern(String id, String pattern, ParserContext parserContext) {
  		if (!"".equals(id)) { // add to sitemap only if it has an id
  			BeanDefinitionRegistry registry = parserContext.getRegistry();
  			BeanDefinition sitemapBean;
  			try {
  				sitemapBean = registry.getBeanDefinition(BEAN_ID);
  			} catch (NoSuchBeanDefinitionException e) {
  				sitemapBean = BeanDefinitionBuilder.genericBeanDefinition(Sitemap.class)
  					.addPropertyValue(BEAN_PROP_ENTRIES, new HashMap<String, String>())
  					.getBeanDefinition();
  				registry.registerBeanDefinition(BEAN_ID, sitemapBean);
  			}
  			((Map<String, String>) sitemapBean.getPropertyValues().getPropertyValue(BEAN_PROP_ENTRIES).getValue()).put(id, pattern);
  		}
  	}
docs: /* static helper