@Override public JAXBContext findCacheXmlTypeContext(MediaType mediaType, Annotation[] paraAnnotations, Class... classes) throws JAXBException { CacheKey key = new CacheKey(classes); JAXBContext ctx = xmlTypeCollectionCache.get(key); if (ctx != null) return ctx; ctx = createXmlTypeContext(paraAnnotations, classes); xmlTypeCollectionCache.put(key, ctx); return ctx; } }
@Override public JAXBContext findCacheXmlTypeContext(MediaType mediaType, Annotation[] annotations, Class... classes) throws JAXBException { CacheKey key = new CacheKey(classes); Mapped mapped = FindAnnotation.findAnnotation(annotations, Mapped.class); BadgerFish badger = FindAnnotation.findAnnotation(annotations, BadgerFish.class); if (badger != null) { JAXBContext ctx = badgerXmlTypeCollectionCache.get(key); if (ctx != null) return ctx; ctx = createXmlTypeContext(annotations, classes); badgerXmlTypeCollectionCache.put(key, ctx); return ctx; } else { JAXBContext ctx = mappedXmlTypeCollectionCache.get(key); if (ctx != null) return ctx; ctx = createXmlTypeContext(annotations, classes); mappedXmlTypeCollectionCache.put(key, ctx); return ctx; } }
public JAXBContext findCacheContext(MediaType mediaType, Annotation[] annotations, Class... classes) throws JAXBException { CacheKey key = new CacheKey(classes); Mapped mapped = FindAnnotation.findAnnotation(annotations, Mapped.class); BadgerFish badger = FindAnnotation.findAnnotation(annotations, BadgerFish.class); if (badger != null) { JAXBContext ctx = badgerCollectionCache.get(key); if (ctx != null) return ctx; ctx = new BadgerContext(classes); badgerCollectionCache.put(key, ctx); return ctx; } else { JAXBContext ctx = mappedCollectionCache.get(key); if (ctx != null) return ctx; ctx = new JettisonMappedContext(mapped, classes); mappedCollectionCache.put(key, ctx); return ctx; } }
public JAXBContext findCacheContext(MediaType mediaType, Annotation[] paraAnnotations, Class... classes) throws JAXBException { CacheKey key = new CacheKey(classes); JAXBContext ctx = collectionCache.get(key); if (ctx != null) return ctx; ctx = createContext(paraAnnotations, classes); collectionCache.put(key, ctx); return ctx; }