Here you can find the source of createUnmarshaller(Class> clazz)
public static Unmarshaller createUnmarshaller(Class<?> clazz) throws JAXBException
//package com.java2s; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; public class Main { public static Unmarshaller createUnmarshaller(Class<?> clazz) throws JAXBException { JAXBContext context = JAXBContext.newInstance(clazz); Unmarshaller unmarshaller = context.createUnmarshaller(); return unmarshaller; }//from w w w.j a va 2s . com }