Add support for native java predicate and a `restrict` shortcut.