Here you can find the source of getCache()
private static Map<String, XPathExpression> getCache()
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; import javax.xml.xpath.XPathExpression; public class Main { private static ThreadLocal<Map<String, XPathExpression>> sCache = new ThreadLocal<Map<String, XPathExpression>>(); private static Map<String, XPathExpression> getCache() { Map<String, XPathExpression> mRetVal = sCache.get(); if (mRetVal == null) { mRetVal = new HashMap<String, XPathExpression>(); sCache.set(mRetVal);/*from w w w .j a va 2 s .co m*/ } return mRetVal; } }