I want to add a method to all enums with the signature "String getName()".

Any ideas?

This doesn't appear to work:

public aspect GetNameEnumIntroduction {

        interface Introduced { String name(); }
        
        declare parents : (Enum+) implements Introduced;
        
        public String Introduced.getName() {
                return this.name();
        }
}

It also doesn't work if I change the type expression of declare
parents to (Enum<? extends Enum>+).

Thanks,
Matthew

-- 
mailto:[email protected]
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:[email protected]
msn:[email protected]
http://matthewadams.me
http://www.linkedin.com/in/matthewadams
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to