ClassNameUtils { public static String removeTypeAndArray(String name) { return removeTypeParameter(removeArray(name)); } private  ClassNameUtils(); static boolean isPrimitive(final String className); static boolean isArray(final String name); static String replaceFromMap(final String string, final Map<String, String> replacements); static String replaceDot2FileSep(final String string); static String replaceSlash(String string); static String getParentClass(final String name); static String replaceInnerMark(final String string); static String replaceDotToInnerMark(String string, boolean last); static String removeTypeMark(final String val); static Optional<String> toInnerClassName(final String name); static boolean hasPackage(String name); static String getSimpleName(final String fqcn); static String getPackage(final String fqcn); static Optional<String> getTypeVariable(final String val); static String removeTypeParameter(String name); static String removeTypeAndArray(String name); static List<String> parseTypeParameter(final String str); static String removeCapture(final String name); static String removeCaptureAndWildCard(final String name); static String getAllSimpleName(final String name); static String removeWildcard(final String name); static boolean compareArgumentType(
      List<String> arguments, List<String> parameters, boolean hasVarargs); static boolean isAnonymousClass(final String name); static void replaceDescriptorsType(
      final String nameWithTP, final List<MemberDescriptor> members); static String getClassName(final String s); static final String OBJECT_CLASS; static final String OBJECT; static final String CLASS_TYPE_VARIABLE_MARK; static final String FORMAL_TYPE_VARIABLE_MARK; static final String INNER_MARK; static final String CAPTURE_OF; static final String ARRAY; }
@Test public void removeTypeArrayParameter1() throws Exception { String name = "java.util.Map<K, V>[]"; final String s = ClassNameUtils.removeTypeAndArray(name); assertEquals("java.util.Map", s); }
@Test public void removeTypeArrayParameter2() throws Exception { String name = "java.util.Map<K, V>$Entry[]"; final String s = ClassNameUtils.removeTypeAndArray(name); assertEquals("java.util.Map$Entry", s); }
@Test public void removeTypeArrayParameter3() throws Exception { String name = "java.util.Map<Object[], Void>"; final String s = ClassNameUtils.removeTypeAndArray(name); assertEquals("java.util.Map", s); }