@Test public void testKeyString() { assertEquals("rootPrefix." + SERVER_ALIAS + ".MemoryAlias.ObjectPendingFinalizationCount", KeyUtils.getKeyString( serverWithAliasAndNoQuery(), dummyQueryWithResultAlias(), numericResult(), ImmutableList.of("typeName"), "rootPrefix")); assertEquals("rootPrefix.ObjectPendingFinalizationCount", KeyUtils.getKeyString( dummyServerBuilder().setAlias("").build(), dummyQuery(), numericResult("", 10), ImmutableList.of("typeName"), "rootPrefix")); assertEquals("MemoryAlias.ObjectPendingFinalizationCount", KeyUtils.getKeyString( dummyServerBuilder().setAlias("").build(), dummyQuery(), numericResult(10), ImmutableList.of("typeName"), "")); assertEquals(SERVER_ALIAS + ".ObjectPendingFinalizationCount", KeyUtils.getKeyString( dummyServerBuilder().setAlias(SERVER_ALIAS).build(), dummyQuery(), numericResult("", 10), ImmutableList.of("typeName"), "")); assertEquals("ObjectPendingFinalizationCount", KeyUtils.getKeyString( dummyServerBuilder().setAlias("").build(), dummyQuery(), numericResult("", 10), ImmutableList.of("typeName"), "")); }
public static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix) { StringBuilder sb = new StringBuilder(); addRootPrefix(rootPrefix, sb); addAlias(server, sb); addSeparator(sb); addMBeanIdentifier(query, result, sb); addSeparator(sb); addTypeName(query, result, typeNames, sb); addKeyString(query, result, sb); return sb.toString(); }
KeyUtils { public static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix) { StringBuilder sb = new StringBuilder(); addRootPrefix(rootPrefix, sb); addAlias(server, sb); addSeparator(sb); addMBeanIdentifier(query, result, sb); addSeparator(sb); addTypeName(query, result, typeNames, sb); addKeyString(query, result, sb); return sb.toString(); } }
KeyUtils { public static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix) { StringBuilder sb = new StringBuilder(); addRootPrefix(rootPrefix, sb); addAlias(server, sb); addSeparator(sb); addMBeanIdentifier(query, result, sb); addSeparator(sb); addTypeName(query, result, typeNames, sb); addKeyString(query, result, sb); return sb.toString(); } private  KeyUtils(); }
KeyUtils { public static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix) { StringBuilder sb = new StringBuilder(); addRootPrefix(rootPrefix, sb); addAlias(server, sb); addSeparator(sb); addMBeanIdentifier(query, result, sb); addSeparator(sb); addTypeName(query, result, typeNames, sb); addKeyString(query, result, sb); return sb.toString(); } private  KeyUtils(); static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix); static String getKeyString(Query query, Result result, List<String> typeNames); static String getPrefixedKeyString(Query query, Result result, List<String> typeNames); static String getValueKey(Result result); static String getValuePathString(Result result); }
KeyUtils { public static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix) { StringBuilder sb = new StringBuilder(); addRootPrefix(rootPrefix, sb); addAlias(server, sb); addSeparator(sb); addMBeanIdentifier(query, result, sb); addSeparator(sb); addTypeName(query, result, typeNames, sb); addKeyString(query, result, sb); return sb.toString(); } private  KeyUtils(); static String getKeyString(Server server, Query query, Result result, List<String> typeNames, String rootPrefix); static String getKeyString(Query query, Result result, List<String> typeNames); static String getPrefixedKeyString(Query query, Result result, List<String> typeNames); static String getValueKey(Result result); static String getValuePathString(Result result);  }