/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.policy.variable.NoSuchVariableException
 */
package com.l7tech.server.policy.variable;

import com.l7tech.policy.variable.NoSuchVariableException;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.variable.bg;

class fv {
    private final bg a;
    private final String b;

    fv(String string, bg bg2) {
        this.b = string;
        this.a = bg2;
    }

    public String getName() {
        return this.b;
    }

    Object a(String string, PolicyEnforcementContext policyEnforcementContext) throws NoSuchVariableException {
        try {
            if (this.a == null) {
                return policyEnforcementContext.getVariable(string);
            }
        }
        catch (NoSuchVariableException noSuchVariableException) {
            throw fv.a(noSuchVariableException);
        }
        return this.a.get(string, policyEnforcementContext);
    }

    boolean a(PolicyEnforcementContext policyEnforcementContext) {
        return this.a == null || this.a.a(policyEnforcementContext);
    }

    private static NoSuchVariableException a(NoSuchVariableException noSuchVariableException) {
        return noSuchVariableException;
    }
}

