I have an interface like this:

public interface EventListener<EVENTTYPE>
{
        <EV extends EVENTTYPE> void handle(EV event);
}

And I'm creating a class that implements it such as:

EventListener<SomeEvent> s = new EventListener<SomeEvent>() {
                        public <V extends SomeEvent> void handle(final V event)
                        {
// ...
                        }
}

I have tried it in non-anonymous case as well.
Compilation gives an error saying:

The type new EventListener<SomeEvent>(){} must implement the inherited
abstract method EventListener<SomeEvent>.handle(EV)

When using the eclipse or javac compiler, there is no error.

To complicate the question, I'm using maven for build, this for the compiler:
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>aspectj-maven-plugin</artifactId>
                                <version>1.1-SNAPSHOT</version>

And I think that results in aspectj 1.5.4 being used, though if you
know how to change it so it will use more recent, please tell me.

Thanks!
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to