class XMLUtilities {

    public static Element marshalJAXBObjectToElement(Object jaxbElement) throws JAXBException
    {
        Utilities.checkNull(jaxbElement, "jaxbElement");
        Class<?>[] classes = jaxbElement instanceof JAXBElement ? new Class<?>[0] : new Class<?>[] { jaxbElement.getClass() };
        JAXBContext context = JAXBContextHelper.getCachedContext(classes);
        return marshalJAXBObjectToElement(jaxbElement, context);
    }

    private  XMLUtilities();

}