public ObjectMarshaller<C> findMarhallerFor(Object o) { if (supports(o)) { return om; } return next != null ? next.findMarhallerFor(o) : null; }
public ObjectMarshaller<C> getMarshaller(Object o) { ObjectMarshaller<C> marshaller = null; Integer cacheKey = null; if (!developmentMode && cacheObjectMarshallerByClass && o != null) { cacheKey = System.identityHashCode(o.getClass()); marshaller = objectMarshallerForClassCache.get(cacheKey); if (marshaller != NULL_HOLDER && marshaller != null && !marshaller.supports(o)) { marshaller = null; } } if (marshaller == null) { marshaller = root.findMarhallerFor(o); if (cacheKey != null) { objectMarshallerForClassCache.put(cacheKey, marshaller != null ? marshaller : NULL_HOLDER); } } return marshaller != NULL_HOLDER ? marshaller : null; }