title: ApplicationListener cannot be parameterized with arguments?
body: <p>So I was setting up a custom ApplicationEvent and ApplicationListener for my Spring batch program. I followed the instructions <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#context-functionality-events" rel="nofollow">here</a> at section 3.13.2</p>
  
  <p>Here is the ApplicationEvent I created</p>
  
  <pre><code>import org.springframework.context.ApplicationEvent;
  
  public class DataReaderEvent extends ApplicationEvent {
  
    private final String progress;
    private final String text;
  
    public DataReaderEvent(Object source, String progress, String text) {
        super(source);
        this.progress = progress;
        this.text = text;
    }
  
    public String getProgress() {
        return progress;
    }
  
    public String getText() {
        return text;
    }
  
  }
  </code></pre>
  
  <p>And my ApplicationListener</p>
  
  <pre><code>import org.springframework.context.ApplicationListener;
  
  public class DataReaderNotifier implements ApplicationListener&lt;DataReaderEvent&gt; {
  
    private String progress;
    private String text;
  
  
    @Override
    public void onApplicationEvent(DataReaderEvent event) {
        this.progress = event.getProgress();
        this.text = event.getText();
    }
  
    public String getProgress() {
        return progress;
    }
  
    public String getText() {
        return text;
    }
  }  
  </code></pre>
  
  <p>The problem I am having is that the ApplicationListener complains about me trying to do
  ApplicationListener &lt; DataReaderEvent ></p>
  
  <p>it says,
      "The type ApplicationListener is not generic; it cannot be parameterized with arguments      DataEventReader"</p>
  
  <p>I don't understand why this would be the case because I think I followed the example pretty closely. If anyone has any ideas they would be greatly appreciated. </p>