public void registerMessage(Class<?> cls){
  AtomicInteger cntr=cntMap.get(cls);
  if (cntr == null)   cntMap.put(cls,new AtomicInteger());
}

public void registerMessage ( Class < ? > cls ) { AtomicInteger cntr = cntMap . get ( cls ) ; if ( cntr == null ) cntMap . put ( cls , new AtomicInteger ( ) ) ; }
registers message for counting .
