导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - JaninoEventEvaluator.java 源代码

正在查看: bbinstant v6.24.0 应用的 JaninoEventEvaluator.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package ch.qos.logback.classic.boolex;

import androidx.core.app.NotificationCompat;
import ch.qos.logback.classic.spi.c;
import ch.qos.logback.classic.spi.d;
import ch.qos.logback.classic.spi.g;
import ch.qos.logback.classic.spi.j;
import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.boolex.JaninoEventEvaluatorBase;
import ch.qos.logback.core.boolex.Matcher;
import com.amazon.android.apay.commonlibrary.interfaces.external.MerchantConstants;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.slf4j.f;

public class JaninoEventEvaluator extends JaninoEventEvaluatorBase<c> {
    public static final List<String> DEFAULT_PARAM_NAME_LIST;
    public static final List<Class> DEFAULT_PARAM_TYPE_LIST;
    public static final String IMPORT_LEVEL = "import ch.qos.logback.classic.Level;\r\n";

    static {
        ArrayList arrayList = new ArrayList();
        DEFAULT_PARAM_NAME_LIST = arrayList;
        ArrayList arrayList2 = new ArrayList();
        DEFAULT_PARAM_TYPE_LIST = arrayList2;
        arrayList.add("DEBUG");
        arrayList.add("INFO");
        arrayList.add("WARN");
        arrayList.add(MerchantConstants.ERROR);
        arrayList.add(NotificationCompat.CATEGORY_EVENT);
        arrayList.add("message");
        arrayList.add("formattedMessage");
        arrayList.add("logger");
        arrayList.add("loggerContext");
        arrayList.add("level");
        arrayList.add("timeStamp");
        arrayList.add("marker");
        arrayList.add("mdc");
        arrayList.add("throwableProxy");
        arrayList.add("throwable");
        Class cls = Integer.TYPE;
        arrayList2.add(cls);
        arrayList2.add(cls);
        arrayList2.add(cls);
        arrayList2.add(cls);
        arrayList2.add(c.class);
        arrayList2.add(String.class);
        arrayList2.add(String.class);
        arrayList2.add(String.class);
        arrayList2.add(g.class);
        arrayList2.add(cls);
        arrayList2.add(Long.TYPE);
        arrayList2.add(f.class);
        arrayList2.add(Map.class);
        arrayList2.add(d.class);
        arrayList2.add(Throwable.class);
    }

    @Override
    protected String getDecoratedExpression() {
        String expression = getExpression();
        if (!expression.contains("return")) {
            expression = "return " + expression + ";";
            addInfo("Adding [return] prefix and a semicolon suffix. Expression becomes [" + expression + "]");
            addInfo("See also http://logback.qos.ch/codes.html#block");
        }
        return IMPORT_LEVEL + expression;
    }

    @Override
    protected String[] getParameterNames() {
        ArrayList arrayList = new ArrayList();
        arrayList.addAll(DEFAULT_PARAM_NAME_LIST);
        for (int i = 0; i < this.matcherList.size(); i++) {
            arrayList.add(this.matcherList.get(i).getName());
        }
        return (String[]) arrayList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
    }

    @Override
    protected Class[] getParameterTypes() {
        ArrayList arrayList = new ArrayList();
        arrayList.addAll(DEFAULT_PARAM_TYPE_LIST);
        for (int i = 0; i < this.matcherList.size(); i++) {
            arrayList.add(Matcher.class);
        }
        return (Class[]) arrayList.toArray(CoreConstants.EMPTY_CLASS_ARRAY);
    }

    @Override
    public Object[] getParameterValues(c cVar) {
        int size = this.matcherList.size();
        Object[] objArr = new Object[DEFAULT_PARAM_NAME_LIST.size() + size];
        int i = 0;
        objArr[0] = ch.qos.logback.classic.a.DEBUG_INTEGER;
        objArr[1] = ch.qos.logback.classic.a.INFO_INTEGER;
        objArr[2] = ch.qos.logback.classic.a.WARN_INTEGER;
        objArr[3] = ch.qos.logback.classic.a.ERROR_INTEGER;
        objArr[4] = cVar;
        objArr[5] = cVar.getMessage();
        objArr[6] = cVar.getFormattedMessage();
        objArr[7] = cVar.getLoggerName();
        objArr[8] = cVar.getLoggerContextVO();
        objArr[9] = cVar.getLevel().toInteger();
        objArr[10] = Long.valueOf(cVar.getTimeStamp());
        objArr[11] = cVar.getMarker();
        objArr[12] = cVar.getMDCPropertyMap();
        d throwableProxy = cVar.getThrowableProxy();
        if (throwableProxy != null) {
            objArr[13] = throwableProxy;
            if (throwableProxy instanceof j) {
                objArr[14] = ((j) throwableProxy).getThrowable();
            } else {
                objArr[14] = null;
            }
        } else {
            objArr[13] = null;
            objArr[14] = null;
        }
        int i2 = 15;
        while (i < size) {
            objArr[i2] = this.matcherList.get(i);
            i++;
            i2++;
        }
        return objArr;
    }
}