View Javadoc

1   package my;
2   
3   import java.lang.reflect.Field;
4   import java.util.Map;
5   
6   import com.atlassian.plugin.osgi.StaticHolder;
7   
8   import org.springframework.beans.CachedIntrospectionResults;
9   
10  public class ClassCacheRetriever
11  {
12      public ClassCacheRetriever()
13      {
14          try
15          {
16              Field field = CachedIntrospectionResults.class.getDeclaredField("classCache");
17              field.setAccessible(true);
18              Map classCache = (Map) field.get(null);
19  
20              StaticHolder.set(classCache);
21          }
22          catch (Exception e)
23          {
24              throw new RuntimeException(e);
25          }
26      }
27  }