That sounds great yeah. You can probably just implement the trigger() method inside PredicateLock itself. I'll let you play with it and figure out cleanest solution.
I think in terms of performance we can do a bit better. The nature of the if/else-if/else-if... is that only one can ever run right. In that case it seems like we should be able to a simple map lookup type thing. It may be tricky because although the type checks are always just == the path checks equals(), contains() others, and endsWith()... Looking at the code I think the endsWith() is equivalent to using equals() on the last entry in the path (`basename`).
Really at a high level each signal trigger is a Pair<EventType,path-regex> and this is a list of matchers. We could get fun with this and just write a state machine with something like Ragel (google it) and use that to spit out some simple Enum value of which trigger matched the path. This is probably all overkill though, but I like languages .
Anyways for now I think your solution is good let's do that, and if you're interested in further exploring performance improvements we can do it in another JIRA.