1 | /* |
2 | @license.text@ |
3 | */ |
4 | package com.hammurapi.eventbus.tests.familyties.rules; |
5 | |
6 | import com.hammurapi.common.Condition; |
7 | import com.hammurapi.eventbus.Handler; |
8 | import com.hammurapi.eventbus.tests.familyties.model.Child; |
9 | import com.hammurapi.eventbus.tests.familyties.model.Son; |
10 | |
11 | public class SonRule extends FamilyTiesRules { |
12 | |
13 | @Handler(posts=Son.class) |
14 | public Son infer(@Condition("java(child)://!(child instanceof com.hammurapi.eventbus.tests.familyties.model.Son) && child.getSubject().isMale()") Child child) { |
15 | return new Son(child.getSubject(), child.getObject()); |
16 | } |
17 | } |