001/*
002 * Logback: the reliable, generic, fast and flexible logging framework.
003 * Copyright (C) 1999-2025, QOS.ch. All rights reserved.
004 *
005 * This program and the accompanying materials are dual-licensed under
006 * either the terms of the Eclipse Public License v1.0 as published by
007 * the Eclipse Foundation
008 *
009 *   or (per the licensee's choosing)
010 *
011 * under the terms of the GNU Lesser General Public License version 2.1
012 * as published by the Free Software Foundation.
013 */
014
015package ch.qos.logback.classic.boolex;
016
017import ch.qos.logback.classic.spi.ILoggingEvent;
018import ch.qos.logback.core.boolex.EvaluationException;
019import ch.qos.logback.core.boolex.EventEvaluatorBase;
020import ch.qos.logback.core.boolex.Matcher;
021
022import java.util.ArrayList;
023import java.util.List;
024
025public class StubEventEvaluator  extends EventEvaluatorBase<ILoggingEvent> {
026
027    static public final String MSG_0 = "This class is a stub for JaninoEventEvaluator which was removed in logback version 1.5.13";
028    static public final String MSG_1 = "You can migrate existing configurations to Java-only equivalents with the \"Janino Expression migrator\" tool at:";
029    static public final String MSG_2 ="https://logback.qos.ch/translator/services/janinoExpressionMigrator.html";
030
031    protected List<Matcher> matcherList = new ArrayList<>();
032    String expression;
033
034    @Override
035    public void start() {
036        stop();
037        addWarn(MSG_0);
038        addWarn(MSG_1);
039        addWarn(MSG_2);
040    }
041
042    @Override
043    public boolean evaluate(ILoggingEvent event) throws NullPointerException, EvaluationException {
044        return false;
045    }
046
047    public String getExpression() {
048        return expression;
049    }
050
051    public void setExpression(String expression) {
052        this.expression = expression;
053    }
054
055    public void addMatcher(Matcher matcher) {
056        matcherList.add(matcher);
057    }
058
059}