In the code below field highlighting breaks completely if "class" is reverted back to "enum".
Plus, the last
return level;
level doesn't resolve to a field, it is white and 'goto local' leads to level() method declatation, unless it is changed to
return this.level;
package org.larn;
public class MonsterType {
//NONE(' ', "", 0, 0, 0, SpecialAttack.NONE, 0, 3, 0, 0, 0),
//BAT('B', "bat", 1, 0, 1, SpecialAttack.NONE, 0, 3, 0, 1, 1)
private final char monsterChar;
private final String name;
private final int level;
MonsterType(char monsterChar, String name, int level) {
this.monsterChar = monsterChar;
this.name = name;
this.level = level;
}
public int level() {
return level;
}
}
In the code below field highlighting breaks completely if "class" is reverted back to "enum".
Plus, the last
return level;
level doesn't resolve to a field, it is white and 'goto local' leads to level() method declatation, unless it is changed to
return this.level;
package org.larn;
public class MonsterType {
//NONE(' ', "", 0, 0, 0, SpecialAttack.NONE, 0, 3, 0, 0, 0),
//BAT('B', "bat", 1, 0, 1, SpecialAttack.NONE, 0, 3, 0, 1, 1)
private final char monsterChar;
private final String name;
private final int level;
}