public JAXBContextResolver(final JettisonConfig jsonConfiguration, final Class<?>[] classes,
final boolean forMoxyProvider) throws Exception {
this.types = new HashSet<>(Arrays.asList(classes));
if (jsonConfiguration != null) {
this.context = new JettisonJaxbContext(jsonConfiguration, classes);
} else {
this.context = forMoxyProvider ?
JAXBContextFactory.createContext(classes, new HashMap()) : JAXBContext.newInstance(classes);
}
}