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 [ParentChildRulesJavaBinder.java]

nameclass, %method, %block, %line, %
ParentChildRulesJavaBinder.java100% (3/3)100% (10/10)100% (175/175)100% (40/40)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ParentChildRulesJavaBinder100% (1/1)100% (4/4)100% (89/89)100% (27/27)
ParentChildRulesJavaBinder (): void 100% (1/1)100% (3/3)100% (1/1)
bind (ParentChildRules, FamilyTiesEventBus): Set 100% (1/1)100% (20/20)100% (4/4)
infer (ParentChildRules, FamilyTiesEventBus): Long 100% (1/1)100% (33/33)100% (11/11)
infer0 (ParentChildRules, FamilyTiesEventBus): Long 100% (1/1)100% (33/33)100% (11/11)
     
class ParentChildRulesJavaBinder$1100% (1/1)100% (3/3)100% (43/43)100% (8/8)
ParentChildRulesJavaBinder$1 (ParentChildRulesJavaBinder, int, Integer, Famil... 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 ParentChildRulesJavaBinder$2100% (1/1)100% (3/3)100% (43/43)100% (8/8)
ParentChildRulesJavaBinder$2 (ParentChildRulesJavaBinder, int, Integer, Famil... 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.ParentChildRules to event bus com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus
17 */
18public class ParentChildRulesJavaBinder 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.ParentChildRules> {
19 
20        @Override
21        public Set<java.lang.Long> bind(com.hammurapi.eventbus.tests.familyties.rules.ParentChildRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
22                Set<java.lang.Long> ret = new HashSet<java.lang.Long>();
23                
24                                ret.add(infer(instance, bus));
25                                ret.add(infer0(instance, bus));
26                                
27                return ret;
28        }
29        
30                
31        private java.lang.Long infer(final com.hammurapi.eventbus.tests.familyties.rules.ParentChildRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
32                
33                Predicate<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules>[] predicates = new Predicate[1];
34                
35                                
36                predicates[0] = new com.hammurapi.extract.InstanceOfPredicate(new com.hammurapi.extract.IndexedExtractor(0), com.hammurapi.eventbus.tests.familyties.model.Parent.class);
37                                
38                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>(
39                        1, 
40                        0, 
41                        instance, 
42                        true, 
43                        false, 
44                        Mode.POST, 
45                        predicates) {
46 
47                        @Override
48                        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) {
49                                 com.hammurapi.eventbus.tests.familyties.model.Child toPost  =  instance.infer(
50                                                                                                                                                
51                                                (com.hammurapi.eventbus.tests.familyties.model.Parent) events[0]                                                                                                
52                                );
53                                
54                                 
55                                
56                                if (com.hammurapi.eventbus.tests.familyties.model.Relative.class.isInstance(toPost)) {
57                                        context.post(toPost);
58                                }
59                                                                 
60                        }
61                        
62                        public String toString() {
63                                return "Compiled event handler for method public com.hammurapi.eventbus.tests.familyties.model.Child com.hammurapi.eventbus.tests.familyties.rules.ParentChildRules.infer(com.hammurapi.eventbus.tests.familyties.model.Parent), cardinality="+getCardinality();
64                        }
65        
66                                
67                };
68                
69                return bus.addHandler(eventHandler);                
70        }
71 
72                
73        private java.lang.Long infer0(final com.hammurapi.eventbus.tests.familyties.rules.ParentChildRules instance, com.hammurapi.eventbus.tests.familyties.FamilyTiesEventBus bus) {
74                
75                Predicate<com.hammurapi.eventbus.tests.familyties.model.Relative, com.hammurapi.eventbus.tests.familyties.rules.FamilyTiesRules>[] predicates = new Predicate[1];
76                
77                                
78                predicates[0] = new com.hammurapi.extract.InstanceOfPredicate(new com.hammurapi.extract.IndexedExtractor(0), com.hammurapi.eventbus.tests.familyties.model.Child.class);
79                                
80                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>(
81                        1, 
82                        0, 
83                        instance, 
84                        true, 
85                        false, 
86                        Mode.POST, 
87                        predicates) {
88 
89                        @Override
90                        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) {
91                                 com.hammurapi.eventbus.tests.familyties.model.Parent toPost  =  instance.infer(
92                                                                                                                                                
93                                                (com.hammurapi.eventbus.tests.familyties.model.Child) events[0]                                                                                                
94                                );
95                                
96                                 
97                                
98                                if (com.hammurapi.eventbus.tests.familyties.model.Relative.class.isInstance(toPost)) {
99                                        context.post(toPost);
100                                }
101                                                                 
102                        }
103                        
104                        public String toString() {
105                                return "Compiled event handler for method public com.hammurapi.eventbus.tests.familyties.model.Parent com.hammurapi.eventbus.tests.familyties.rules.ParentChildRules.infer(com.hammurapi.eventbus.tests.familyties.model.Child), cardinality="+getCardinality();
106                        }
107        
108                                
109                };
110                
111                return bus.addHandler(eventHandler);                
112        }
113 
114                
115}

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