TypeMirrorUtils { public boolean isMap(TypeMirror type) { if (type.toString().startsWith(Map.class.getName())) { return true; } List<? extends TypeMirror> inherits = types.directSupertypes(type); for (TypeMirror inherit : inherits) { if (isMap(inherit)) { return true; } } return false; } TypeMirrorUtils(Types types); boolean isXmlType(TypeMirror type); boolean isCollection(TypeMirror type); boolean isNestedProcessor(TypeMirror type); boolean isArrayOrList(TypeMirror type); boolean isMap(TypeMirror type); boolean isEnum(TypeMirror type); boolean ignoreParameter(Element element); boolean isString(Element element); boolean isBoolean(Element element); boolean isInteger(Element element); boolean isLong(Element element); boolean isFloat(Element element); boolean isDouble(Element element); boolean isChar(Element element); boolean isEnum(Element element); boolean isCollection(Element element); boolean isHttpCallback(Element element); boolean isURL(Element element); boolean isDate(Element element); String getJavaType(Element element); String getJavaType(ExecutableElement element);  }
@Test public void testIsMapForListOfMaps() throws Exception { when(typeMirror.toString()).thenReturn("java.util.List<java.util.Map<java.lang.String,java.lang.String>>"); assertFalse(new TypeMirrorUtils(types).isMap(typeMirror)); }