}
return array;
} else {
ContainerPolicy containerPolicy;
if(type.isAssignableFrom(List.class) || type.isAssignableFrom(ArrayList.class) || type.isAssignableFrom(Collection.class)) {
containerPolicy = new CollectionContainerPolicy(ArrayList.class);
} else if(type.isAssignableFrom(Set.class)) {
containerPolicy = new CollectionContainerPolicy(HashSet.class);
} else if(type.isAssignableFrom(Deque.class) || type.isAssignableFrom(Queue.class)) {
containerPolicy = new CollectionContainerPolicy(LinkedList.class);
} else if(type.isAssignableFrom(NavigableSet.class) || type.isAssignableFrom(SortedSet.class)) {
containerPolicy = new CollectionContainerPolicy(TreeSet.class);
} else {
containerPolicy = new CollectionContainerPolicy(type);
}
Object container = containerPolicy.containerInstance();
boolean wrapItemInJAXBElement = false;
if(genericType instanceof ParameterizedType) {
Type actualType = ((ParameterizedType) genericType).getActualTypeArguments()[0];