code: @SuppressWarnings({ "unchecked", "rawtypes" })
    protected Object getFromFunction(CachingPojoPath currentPath, PojoPathContext context, PojoPathState state, PojoPathFunction function) {
  
      Object parentPojo = currentPath.parent.pojo;
      // TODO: convert parentPojo from parentPojoType to function.getInputClass()
      // if necessary.
      Object result = function.get(parentPojo, currentPath.getFunction(), context);
      if ((result == null) && (state.mode == PojoPathMode.CREATE_IF_NULL)) {
        result = function.create(parentPojo, currentPath.getFunction(), context);
        if (result == null) {
          throw new PojoPathCreationException(state.rootPath.pojo, currentPath.getPojoPath());
        }
      }
      if (!function.isDeterministic()) {
        state.setCachingDisabled();
      }
      return result;
    }
docs: This method {@link PojoPathFunction#get(Object, String, PojoPathContext) gets} the single
  {@link CachingPojoPath#getSegment() segment} of the given {@code currentPath} from the
  {@link net.sf.mmm.util.pojo.api.Pojo} given by {@code parentPojo}. If the result is {@code null} and
  {@link PojoPathState#getMode() mode} is {@link PojoPathMode#CREATE_IF_NULL} it
  {@link PojoPathFunction#create(Object, String, PojoPathContext) creates} the missing object.
  
  @param currentPath is the current {@link CachingPojoPath} to evaluate.
  @param context is the {@link PojoPathContext context} for this operation.
  @param state is the {@link #createState(Object, String, PojoPathMode, PojoPathContext) state} of this operation.
  @param function is the {@link PojoPathFunction} for evaluation.
  @return the result of the evaluation. It might be {@code null} according to the {@link PojoPathState#getMode()
  mode}.