@Test public void testGetShortName() { Assert.assertEquals("TestClass", ObjectClassMatcher.getShortName("org.apache.TestClass")); Assert.assertEquals("", ObjectClassMatcher.getShortName("test.")); Assert.assertEquals("TestClass", ObjectClassMatcher.getShortName("TestClass")); }
static String getShortName(String name) { int idx = name.lastIndexOf("."); if (idx + 1 > name.length()) { idx = 0; } return name.substring(idx + 1); }
ObjectClassMatcher { static String getShortName(String name) { int idx = name.lastIndexOf("."); if (idx + 1 > name.length()) { idx = 0; } return name.substring(idx + 1); } }
ObjectClassMatcher { static String getShortName(String name) { int idx = name.lastIndexOf("."); if (idx + 1 > name.length()) { idx = 0; } return name.substring(idx + 1); } private  ObjectClassMatcher(); }
ObjectClassMatcher { static String getShortName(String name) { int idx = name.lastIndexOf("."); if (idx + 1 > name.length()) { idx = 0; } return name.substring(idx + 1); } private  ObjectClassMatcher();  }
ObjectClassMatcher { static String getShortName(String name) { int idx = name.lastIndexOf("."); if (idx + 1 > name.length()) { idx = 0; } return name.substring(idx + 1); } private  ObjectClassMatcher();   }