Class CachingMapper

  • All Implemented Interfaces:
    Caching, Mapper

    public class CachingMapper
    extends MapperWrapper
    implements Caching
    Mapper that caches which names map to which classes. Prevents repetitive searching and class loading.
    • Field Detail

      • realClassCache

        private transient java.util.Map realClassCache
    • Constructor Detail

      • CachingMapper

        public CachingMapper​(Mapper wrapped)
    • Method Detail

      • realClass

        public java.lang.Class realClass​(java.lang.String elementName)
        Description copied from interface: Mapper
        How a serialized class representation should be mapped back to a real class.
        Specified by:
        realClass in interface Mapper
        Overrides:
        realClass in class MapperWrapper
      • flushCache

        public void flushCache()
        Specified by:
        flushCache in interface Caching
      • readResolve

        private java.lang.Object readResolve()