package rocks.matchmaker;

import java.util.function.Function;

public interface Property<T> {

    <S> PropertyMatcher<T, S> matching(Matcher<S> matcher);

    static <T> Property<T> property(Function<T, ?> property) {
        return optionalProperty(source -> Option.of(property.apply(source)));
    }

    static <T> Property<T> optionalProperty(Function<T, Option<?>> property) {
        return new Property<T>() {
            @Override
            public <S> PropertyMatcher<T, S> matching(Matcher<S> matcher) {
                return new PropertyMatcher<>(property, matcher);
            }
        };
    }
}
@@ -605,10 +605,99 @@
 %7D;%0A    %7D
+%0A%0A    static %3CT%3E Property%3CT%3E self() %7B%0A        return property(Function.identity());%0A    %7D
 %0A%7D

Add `Property.self()` factory method