Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.drools.impl.adapters;
  
 import  org.kie.api.event.rule.AfterMatchFiredEvent;
 import  org.kie.api.event.rule.AgendaGroupPoppedEvent;
 import  org.kie.api.event.rule.AgendaGroupPushedEvent;
 import  org.kie.api.event.rule.BeforeMatchFiredEvent;
 import  org.kie.api.event.rule.MatchCancelledEvent;
 import  org.kie.api.event.rule.MatchCreatedEvent;
 import  org.kie.api.event.rule.RuleFlowGroupActivatedEvent;
 import  org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent;
 
 public class AgendaEventListenerAdapter implements org.kie.api.event.rule.AgendaEventListener {
 
     private final AgendaEventListener delegate;
 
     public AgendaEventListenerAdapter(AgendaEventListener delegate) {
         this. = delegate;
     }
 
     public void matchCreated(final MatchCreatedEvent event) {
             public Activation getActivation() {
                 return new ActivationAdapter(event.getMatch());
             }
 
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
     }
 
     public void matchCancelled(final MatchCancelledEvent event) {
             public ActivationCancelledCause getCause() {
                 switch (event.getCause()) {
                     case CLEAR:
                         return .;
                     case FILTER:
                         return .;
                     case WME_MODIFY:
                         return .;
                 }
                 return null;
             }
 
             public Activation getActivation() {
                 return new ActivationAdapter(event.getMatch());
             }
 
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
     }
 
     public void beforeMatchFired(final BeforeMatchFiredEvent event) {
             public Activation getActivation() {
                 return new ActivationAdapter(event.getMatch());
             }
 
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
     }
 
     public void afterMatchFired(final AfterMatchFiredEvent event) {
             public Activation getActivation() {
                 return new ActivationAdapter(event.getMatch());
             }
 
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
     }
 
     public void agendaGroupPopped(final AgendaGroupPoppedEvent event) {
             public AgendaGroup getAgendaGroup() {
                 return new AgendaGroupAdapter(event.getAgendaGroup());
             }
 
             public KnowledgeRuntime getKnowledgeRuntime() {
                 return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
             }
         });
    }
    public void agendaGroupPushed(final AgendaGroupPushedEvent event) {
            public AgendaGroup getAgendaGroup() {
                return new AgendaGroupAdapter(event.getAgendaGroup());
            }
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
        });
    }
    public void beforeRuleFlowGroupActivated(final RuleFlowGroupActivatedEvent event) {
            public RuleFlowGroup getRuleFlowGroup() {
                return new RuleFlowGroupAdapter(event.getRuleFlowGroup());
            }
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
        });
    }
    public void afterRuleFlowGroupActivated(final RuleFlowGroupActivatedEvent event) {
            public RuleFlowGroup getRuleFlowGroup() {
                return new RuleFlowGroupAdapter(event.getRuleFlowGroup());
            }
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
        });
    }
    public void beforeRuleFlowGroupDeactivated(final RuleFlowGroupDeactivatedEvent event) {
            public RuleFlowGroup getRuleFlowGroup() {
                return new RuleFlowGroupAdapter(event.getRuleFlowGroup());
            }
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
        });
    }
    public void afterRuleFlowGroupDeactivated(final RuleFlowGroupDeactivatedEvent event) {
            public RuleFlowGroup getRuleFlowGroup() {
                return new RuleFlowGroupAdapter(event.getRuleFlowGroup());
            }
            public KnowledgeRuntime getKnowledgeRuntime() {
                return new KnowledgeRuntimeAdapter((org.kie.internal.runtime.KnowledgeRuntime) event.getKieRuntime());
            }
        });
    }
    @Override
    public int hashCode() {
        return .hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        return obj instanceof AgendaEventListenerAdapter && .equals(((AgendaEventListenerAdapter)obj).);
    }
New to GrepCode? Check out our FAQ X