code: public Marshaller createMarshaller(Class<?> clazz) throws JAXBException {
      Marshaller marshaller = getContext(clazz).createMarshaller();
      setMarshallerProperties(marshaller);
      return marshaller;
    }
docs: Creates a new {@link javax.xml.bind.Marshaller} that handles the supplied class.