EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus.tests.familyties.rules]

COVERAGE SUMMARY FOR SOURCE FILE [SpouseRulesJavaBinder.java]

nameclass, %method, %block, %line, %
SpouseRulesJavaBinder.java100% (4/4)100% (14/14)100% (323/323)100% (58/58)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SpouseRulesJavaBinder100% (1/1)100% (5/5)100% (194/194)100% (39/39)
SpouseRulesJavaBinder (): void 100% (1/1)100% (3/3)100% (1/1)
bind (SpouseRules, FamilyTiesEventBus): Set 100% (1/1)100% (27/27)100% (5/5)
inferHusband (SpouseRules, FamilyTiesEventBus): Long 100% (1/1)100% (64/64)100% (11/11)
inferSpouse (SpouseRules, FamilyTiesEventBus): Long 100% (1/1)100% (33/33)100% (11/11)
inferWife (SpouseRules, FamilyTiesEventBus): Long 100% (1/1)100% (67/67)100% (11/11)
     
class SpouseRulesJavaBinder$1100% (1/1)100% (3/3)100% (43/43)100% (8/8)
SpouseRulesJavaBinder$1 (SpouseRulesJavaBinder, int, Integer, FamilyTiesRules... 100% (1/1)100% (16/16)100% (2/2)
post (EventDispatchContext, Relative []): void 100% (1/1)100% (18/18)100% (5/5)
toString (): String 100% (1/1)100% (9/9)100% (1/1)
     
class SpouseRulesJavaBinder$2100% (1/1)100% (3/3)100% (43/43)100% (8/8)
SpouseRulesJavaBinder$2 (SpouseRulesJavaBinder, int, Integer, FamilyTiesRules... 100% (1/1)100% (16/16)100% (2/2)
post (EventDispatchContext, Relative []): void 100% (1/1)100% (18/18)100% (5/5)
toString (): String 100% (1/1)100% (9/9)100% (1/1)
     
class SpouseRulesJavaBinder$3100% (1/1)100% (3/3)100% (43/43)100% (8/8)
SpouseRulesJavaBinder$3 (SpouseRulesJavaBinder, int, Integer, FamilyTiesRules... 100% (1/1)100% (16/16)100% (2/2)
post (EventDispatchContext, Relative []): void 100% (1/1)100% (18/18)100% (5/5)
toString (): String 100% (1/1)100% (9/9)100% (1/1)

1package com.hammurapi.eventbus.tests.familyties.rules;
2 
3import java.util.HashSet;
4import java.util.Set;
5 
6import com.hammurapi.eventbus.AbstractEventBus;
7import com.hammurapi.eventbus.AbstractEventBus.Handle;
8import com.hammurapi.eventbus.AbstractEventHandler;
9import com.hammurapi.eventbus.EventDispatchContext;
10import com.hammurapi.eventbus.EventHandler;
11import com.hammurapi.eventbus.JavaBinder;
12import com.hammurapi.extract.Predicate;
13import com.hammurapi.eventbus.EventHandlerBase.Mode;
14 
15/**
16 * Binds handler class com.hammurapi.eventbus.tests.familyties.rules.SpouseRules to event bus com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus
17 */
18public class SpouseRulesJavaBinder implements JavaBinder<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus, com.hammurapi.eventbus.tests.familyties.rules.SpouseRules> {
19 
20        @Override
21        public Set<java.lang.Long> bind(com.hammurapi.eventbus.tests.familyties.rules.SpouseRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
22                Set<java.lang.Long> ret = new HashSet<java.lang.Long>();
23                
24                                ret.add(inferSpouse(instance, bus));
25                                ret.add(inferHusband(instance, bus));
26                                ret.add(inferWife(instance, bus));
27                                
28                return ret;
29        }
30        
31                
32        private java.lang.Long inferSpouse(final com.hammurapi.eventbus.tests.familyties.rules.SpouseRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
33                
34                Predicate<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules>[] predicates = new Predicate[1];
35                
36                                
37                predicates[0] = new com.hammurapi.extract.InstanceOfPredicate(new com.hammurapi.extract.IndexedExtractor(0), com.hammurapi.eventbus.tests.familyties.model.Spouse.class);
38                                
39                EventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> eventHandler = new AbstractEventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore>(
40                        1, 
41                        0, 
42                        instance, 
43                        true, 
44                        false, 
45                        Mode.POST, 
46                        predicates) {
47 
48                        @Override
49                        public void post(EventDispatchContext<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> context, com.hammurapi.eventbus.tests.familyties.model.Relative... events) {
50                                 com.hammurapi.eventbus.tests.familyties.model.Spouse toPost  =  instance.inferSpouse(
51                                                                                                                                                
52                                                (com.hammurapi.eventbus.tests.familyties.model.Spouse) events[0]                                                                                                
53                                );
54                                
55                                 
56                                
57                                if (com.hammurapi.eventbus.tests.familyties.model.Relative.class.isInstance(toPost)) {
58                                        context.post(toPost);
59                                }
60                                                                 
61                        }
62                        
63                        public String toString() {
64                                return "Compiled event handler for method public com.hammurapi.eventbus.tests.familyties.model.Spouse com.hammurapi.eventbus.tests.familyties.rules.SpouseRules.inferSpouse(com.hammurapi.eventbus.tests.familyties.model.Spouse), cardinality="+getCardinality();
65                        }
66        
67                                
68                };
69                
70                return bus.addHandler(eventHandler);                
71        }
72 
73                
74        private java.lang.Long inferHusband(final com.hammurapi.eventbus.tests.familyties.rules.SpouseRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
75                
76                Predicate<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules>[] predicates = new Predicate[1];
77                
78                                
79                predicates[0] = new com.hammurapi.extract.And(0, null, new com.hammurapi.extract.InstanceOfPredicate(new com.hammurapi.extract.IndexedExtractor(0), com.hammurapi.eventbus.tests.familyties.model.Spouse.class), new Predicate10(null), new com.hammurapi.extract.Not(new com.hammurapi.extract.InstanceOfPredicate(new Extractor70(null), com.hammurapi.eventbus.tests.familyties.model.Husband.class)));
80                                
81                EventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> eventHandler = new AbstractEventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore>(
82                        1, 
83                        0, 
84                        instance, 
85                        true, 
86                        false, 
87                        Mode.POST, 
88                        predicates) {
89 
90                        @Override
91                        public void post(EventDispatchContext<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> context, com.hammurapi.eventbus.tests.familyties.model.Relative... events) {
92                                 com.hammurapi.eventbus.tests.familyties.model.Husband toPost  =  instance.inferHusband(
93                                                                                                                                                
94                                                (com.hammurapi.eventbus.tests.familyties.model.Spouse) events[0]                                                                                                
95                                );
96                                
97                                 
98                                
99                                if (com.hammurapi.eventbus.tests.familyties.model.Relative.class.isInstance(toPost)) {
100                                        context.post(toPost);
101                                }
102                                                                 
103                        }
104                        
105                        public String toString() {
106                                return "Compiled event handler for method public com.hammurapi.eventbus.tests.familyties.model.Husband com.hammurapi.eventbus.tests.familyties.rules.SpouseRules.inferHusband(com.hammurapi.eventbus.tests.familyties.model.Spouse), cardinality="+getCardinality();
107                        }
108        
109                                
110                };
111                
112                return bus.addHandler(eventHandler);                
113        }
114 
115                
116        private java.lang.Long inferWife(final com.hammurapi.eventbus.tests.familyties.rules.SpouseRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
117                
118                Predicate<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules>[] predicates = new Predicate[1];
119                
120                                
121                predicates[0] = new com.hammurapi.extract.And(0, null, new com.hammurapi.extract.InstanceOfPredicate(new com.hammurapi.extract.IndexedExtractor(0), com.hammurapi.eventbus.tests.familyties.model.Spouse.class), new com.hammurapi.extract.Not(new Predicate10(null)), new com.hammurapi.extract.Not(new com.hammurapi.extract.InstanceOfPredicate(new Extractor70(null), com.hammurapi.eventbus.tests.familyties.model.Wife.class)));
122                                
123                EventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> eventHandler = new AbstractEventHandler<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore>(
124                        1, 
125                        0, 
126                        instance, 
127                        true, 
128                        false, 
129                        Mode.POST, 
130                        predicates) {
131 
132                        @Override
133                        public void post(EventDispatchContext<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, com.hammurapi.eventbus.AbstractEventBus.Handle<com.hammurapi.eventbus.tests.familyties.model.Relative, java.lang.Integer, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules, java.lang.Long>, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventStore> context, com.hammurapi.eventbus.tests.familyties.model.Relative... events) {
134                                 com.hammurapi.eventbus.tests.familyties.model.Wife toPost  =  instance.inferWife(
135                                                                                                                                                
136                                                (com.hammurapi.eventbus.tests.familyties.model.Spouse) events[0]                                                                                                
137                                );
138                                
139                                 
140                                
141                                if (com.hammurapi.eventbus.tests.familyties.model.Relative.class.isInstance(toPost)) {
142                                        context.post(toPost);
143                                }
144                                                                 
145                        }
146                        
147                        public String toString() {
148                                return "Compiled event handler for method public com.hammurapi.eventbus.tests.familyties.model.Wife com.hammurapi.eventbus.tests.familyties.rules.SpouseRules.inferWife(com.hammurapi.eventbus.tests.familyties.model.Spouse), cardinality="+getCardinality();
149                        }
150        
151                                
152                };
153                
154                return bus.addHandler(eventHandler);                
155        }
156 
157                
158}

[all classes][com.hammurapi.eventbus.tests.familyties.rules]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov