@Test public void testAccessorDoesNotThrowException() throws Exception { CacheManager cm = new CacheManager(); try { ClusteredInstanceFactoryAccessor.getClusteredInstanceFactory(cm); } finally { cm.shutdown(); } }
public static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager) { try { Field field = CacheManager.class.getDeclaredField("terracottaClient"); field.setAccessible(true); TerracottaClient terracottaClient = (TerracottaClient)field.get(cacheManager); return terracottaClient.getClusteredInstanceFactory(); } catch (NoSuchFieldException nsfe) { throw new CacheException(nsfe); } catch (IllegalAccessException iae) { throw new CacheException(iae); } }
ClusteredInstanceFactoryAccessor { public static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager) { try { Field field = CacheManager.class.getDeclaredField("terracottaClient"); field.setAccessible(true); TerracottaClient terracottaClient = (TerracottaClient)field.get(cacheManager); return terracottaClient.getClusteredInstanceFactory(); } catch (NoSuchFieldException nsfe) { throw new CacheException(nsfe); } catch (IllegalAccessException iae) { throw new CacheException(iae); } } }
ClusteredInstanceFactoryAccessor { public static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager) { try { Field field = CacheManager.class.getDeclaredField("terracottaClient"); field.setAccessible(true); TerracottaClient terracottaClient = (TerracottaClient)field.get(cacheManager); return terracottaClient.getClusteredInstanceFactory(); } catch (NoSuchFieldException nsfe) { throw new CacheException(nsfe); } catch (IllegalAccessException iae) { throw new CacheException(iae); } }  }
ClusteredInstanceFactoryAccessor { public static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager) { try { Field field = CacheManager.class.getDeclaredField("terracottaClient"); field.setAccessible(true); TerracottaClient terracottaClient = (TerracottaClient)field.get(cacheManager); return terracottaClient.getClusteredInstanceFactory(); } catch (NoSuchFieldException nsfe) { throw new CacheException(nsfe); } catch (IllegalAccessException iae) { throw new CacheException(iae); } }  static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager); static void setTerracottaClient(CacheManager cacheManager, TerracottaClient terracottaClient); }
ClusteredInstanceFactoryAccessor { public static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager) { try { Field field = CacheManager.class.getDeclaredField("terracottaClient"); field.setAccessible(true); TerracottaClient terracottaClient = (TerracottaClient)field.get(cacheManager); return terracottaClient.getClusteredInstanceFactory(); } catch (NoSuchFieldException nsfe) { throw new CacheException(nsfe); } catch (IllegalAccessException iae) { throw new CacheException(iae); } }  static ClusteredInstanceFactory getClusteredInstanceFactory(CacheManager cacheManager); static void setTerracottaClient(CacheManager cacheManager, TerracottaClient terracottaClient);  }