001 package com.hammurapi.eventbus.tests;
002
003 import com.hammurapi.eventbus.Handler;
004
005 public class StringHandlerWithMethodCondition {
006
007 private int counter;
008 private boolean ok;
009
010 public int getCounter() {
011 return counter;
012 }
013
014 public boolean isOk() {
015 return ok;
016 }
017
018 @Handler("java(str)://str.equals(\"Hello\")")
019 public void handle(String str) {
020 ++counter;
021 ok = "Hello".equals(str);
022 }
023
024 }