* @param imports The imports.
*/
protected void addComponentTypes(TypeMirror type, Set<String> imports) throws TemplateModelException {
if (includeComponentTypes) {
if (type instanceof MapType) {
MapType mapType = ((MapType) type);
imports.add(classnameFor.convert(mapType.getKeyType()));
imports.add(classnameFor.convert(mapType.getValueType()));
}
else if (((DecoratedTypeMirror) type).isCollection()) {
DeclaredType declaredType = (DeclaredType) type;
Iterator<TypeMirror> actualTypeArguments = declaredType.getActualTypeArguments().iterator();
if (actualTypeArguments.hasNext()) {