@@ -0,0 +1,2242 @@
+/*%0A * Copyright 2019, TeamDev. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.core;%0A%0Aimport java.lang.annotation.Documented;%0Aimport java.lang.annotation.Retention;%0Aimport java.lang.annotation.Target;%0A%0Aimport static java.lang.annotation.ElementType.PARAMETER;%0Aimport static java.lang.annotation.RetentionPolicy.RUNTIME;%0A%0A/**%0A * Filters events delivered to the %7B@linkplain Subscribe subscriber method%7D the first%0A * parameter of which has this annotation.%0A *%0A * %3Cp%3EFor example, the following method would be invoked only if the owner of the created%0A * project is %7B@code mary@ackme.net%7D:%0A * %3Cpre%3E%7B@code%0A * %5C@Subscribe%0A * void on(@Where(field = %22owner.email%22 equals = %22mary@ackme.net%22) ProjectCreated e) %7B ... %7D%0A * %7D%3C/pre%3E%0A *%0A * %3Cp%3E%3Cem%3ENOTE:%3C/em%3E This syntax applies only to events. Filtering state subscriptions%0A * is not supported.%0A */%0A@Retention(RUNTIME)%0A@Target(PARAMETER)%0A@Documented%0Apublic @interface Where %7B%0A%0A    /**%0A     * The %7B@linkplain io.spine.base.FieldPath path to the field%7D of the event message to filter by.%0A     */%0A    String field();%0A%0A    /**%0A     * The expected value of the field.%0A     *%0A     * %3Cp%3EThe value converted with help of %7B@link io.spine.string.Stringifier Stringifier%7Ds into%0A     * the type of the actual value of the message field.%0A     */%0A    String equals();%0A%7D%0A

Introduce new argument filter annotation