/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.Audit
 *  com.l7tech.policy.variable.Syntax
 *  com.l7tech.util.Functions$UnaryThrows
 *  com.l7tech.util.Functions$UnaryVoid
 */
package com.l7tech.server.util;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.policy.variable.Syntax;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.server.util.ContextVariableUtils;
import com.l7tech.util.Functions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

class d
implements Functions.UnaryThrows<Iterable<String>, String, RuntimeException> {
    final Map val$serverVariables;
    final Audit val$auditor;
    final Pattern val$splitPattern;
    final Functions.UnaryVoid val$callback;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    d(Map map, Audit audit, Pattern pattern, Functions.UnaryVoid unaryVoid) {
        this.val$serverVariables = map;
        this.val$auditor = audit;
        this.val$splitPattern = pattern;
        this.val$callback = unaryVoid;
    }

    public Iterable<String> call(String string) throws RuntimeException {
        List<Object> list;
        try {
            list = !Syntax.validateStringOnlyReferencesVariables((String)string) ? new ArrayList<String>(Arrays.asList(ExpandVariables.process(string, this.val$serverVariables, this.val$auditor))) : ExpandVariables.processNoFormat(string, this.val$serverVariables, this.val$auditor);
        }
        catch (RuntimeException runtimeException) {
            throw d.a(runtimeException);
        }
        List<Object> list2 = list;
        return ContextVariableUtils.getStringsFromList(list2, this.val$splitPattern, (Functions.UnaryVoid<Object>)this.val$callback);
    }

    private static RuntimeException a(RuntimeException runtimeException) {
        return runtimeException;
    }
}

