public Mapper getMapper ( Field field ) { Type genericType = field . getGenericType ( ) ; Property propertyAnnotation = field . getAnnotation ( Property . class ) ; boolean indexed = true ; if ( propertyAnnotation != null ) { indexed = propertyAnnotation . indexed ( ) ; } String cacheKey = computeCacheKey ( genericType , indexed ) ; Mapper mapper = cache . get ( cacheKey ) ; if ( mapper == null ) { mapper = createMapper ( field , indexed ) ; } return mapper ; }
Returns the Mapper for the given field . If a Mapper exists in the cache that can map the given field the cached Mapper will be returned . Otherwise a new Mapper is created and returned .