/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.message.HttpServletRequestKnob
 *  com.l7tech.message.Message
 *  com.l7tech.policy.variable.Syntax$SyntaxErrorHandler
 *  jakarta.servlet.http.HttpServletRequest
 */
package com.l7tech.server.policy.variable;

import com.l7tech.message.HttpServletRequestKnob;
import com.l7tech.message.Message;
import com.l7tech.policy.variable.Syntax;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.server.policy.variable.MessageSelector;
import jakarta.servlet.http.HttpServletRequest;

class fe
implements MessageSelector.MessageAttributeSelector {
    private final String a;

    private fe(String string) {
        this.a = string;
    }

    @Override
    public ExpandVariables.Selector.Selection select(Message message, String string, Syntax.SyntaxErrorHandler syntaxErrorHandler, boolean bl2) {
        HttpServletRequestKnob httpServletRequestKnob = (HttpServletRequestKnob)message.getKnob(HttpServletRequestKnob.class);
        if (httpServletRequestKnob == null) {
            return null;
        }
        HttpServletRequest httpServletRequest = httpServletRequestKnob.getHttpServletRequest();
        Object object = httpServletRequest.getAttribute(this.a);
        return new ExpandVariables.Selector.Selection(object == null ? null : object.toString());
    }
}

