Wrapped wrapped = FindAnnotation.findAnnotation(annotations, Wrapped.class);
if (wrapped != null)
{
if (!wrapped.element().equals(ele.getName().getLocalPart()))
{
throw new JAXBUnmarshalException("Collection wrapping failed, expected root element name of " + wrapped.element() + " got " + ele.getName().getLocalPart());
}
if (!wrapped.namespace().equals(ele.getName().getNamespaceURI()))
{
throw new JAXBUnmarshalException("Collection wrapping failed, expect namespace of " + wrapped.namespace() + " got " + ele.getName().getNamespaceURI());
}