code: @SuppressWarnings("rawtypes")
    protected PojoPathState createStateByType(GenericType initialPojoType, String pojoPath, PojoPathMode mode, PojoPathContext context) {
  
      Class<?> initialPojoClass = initialPojoType.getRetrievalClass();
      Map<Object, Object> rawCache = context.getCache();
      if (rawCache == null) {
        CachingPojoPath rootPath = new CachingPojoPath(null, initialPojoClass, initialPojoType);
        return new PojoPathState(rootPath, mode, pojoPath);
      }
      PojoPathCache masterCache = (PojoPathCache) rawCache.get(initialPojoType);
      if (masterCache == null) {
        masterCache = new PojoPathCache(initialPojoClass, initialPojoType);
        rawCache.put(initialPojoType, masterCache);
      }
      return masterCache.createState(mode, pojoPath);
    }
docs: This method gets the {@link PojoPathState} for the given {@code context}.
  
  @param initialPojoType is the initial pojo-type this {@link PojoPathNavigator} was invoked with.
  @param pojoPath is the {@link net.sf.mmm.util.pojo.path.api.PojoPath} to navigate.
  @param mode is the {@link PojoPathMode mode} that determines how to deal with <em>unsafe</em>
  {@link net.sf.mmm.util.pojo.path.api.PojoPath} s.
  @param context is the {@link PojoPathContext context} for this operation.
  @return the {@link PojoPathState} or {@code null} if caching is disabled.