class FunctionMap {
    /**
     * AviatorFunction represents a function that is used in the matchers, used to get attributes in ABAC.
     */
    public Map<String, AviatorFunction> fm;

    public boolean isModify = false;

    /**
     * addFunction adds an expression function.
     *
     * @param name the name of the new function.
     * @param function the function.
     */
    public void addFunction(String name, AviatorFunction function) {
        fm.put(name, function);
        isModify=true;
    }

    /**
     * setAviatorEval adds AviatorEvaluatorInstance to the custom function.
     *
     * @param name        the name of the custom function.
     * @param aviatorEval the AviatorEvaluatorInstance object.
     */
    public void setAviatorEval(String name, AviatorEvaluatorInstance aviatorEval) {<FILL_FUNCTION_BODY>}

    /**
     * setAviatorEval adds AviatorEvaluatorInstance to all the custom function.
     *
     * @param aviatorEval the AviatorEvaluatorInstance object.
     */
    public void setAviatorEval(AviatorEvaluatorInstance aviatorEval) {
        for (AviatorFunction function : fm.values()) {
            if (function instanceof CustomFunction) {
                ((CustomFunction) function).setAviatorEval(aviatorEval);
            }
        }
    }

    /**
     * loadFunctionMap loads an initial function map.
     *
     * @return the constructor of FunctionMap.
     */
    public static FunctionMap loadFunctionMap() {
        FunctionMap fm = new FunctionMap();
        fm.fm = new HashMap<>();

        fm.addFunction("keyMatch", new KeyMatchFunc());
        fm.addFunction("keyMatch2", new KeyMatch2Func());
        fm.addFunction("keyMatch3", new KeyMatch3Func());
        fm.addFunction("keyMatch4", new KeyMatch4Func());
        fm.addFunction("keyMatch5", new KeyMatch5Func());
        fm.addFunction("keyGet", new KeyGetFunc());
        fm.addFunction("keyGet2", new KeyGet2Func());
        fm.addFunction("regexMatch", new RegexMatchFunc());
        fm.addFunction("ipMatch", new IPMatchFunc());
        fm.addFunction("eval", new EvalFunc());
        fm.addFunction("globMatch", new GlobMatchFunc());

        return fm;
    }
}

        if (fm.containsKey(name) && fm.get(name) instanceof CustomFunction) {
            ((CustomFunction) fm.get(name)).setAviatorEval(aviatorEval);
        }
    
<no_super_class>