I'm trying to implement an abstract method in an enum as in code below, but Eclipse is underlining the .getUrls method and displaying the tooltip "this method requires a body instead of a semicolon, two quick fixes: (add body, add 'abstract' modifier)", none of which make sense to me.
The method itself is just a normal method that works in other classes.
What I'm doing wrong?
public enum Site {
PORTAL1 ("http://www.somedomain.net") {
@Override
public void method() {
ArrayList<String> urlList = urlManager.getUrls(int number);
}
};
// more values
public abstract void method();
private final String baseUrl;
private UrlManager urlManager;
private Site(final String baseUrl) {
this.baseUrl = baseUrl;
urlManager = new UrlManager();
}
}