java - "unexpected type" error when comparing enum values -
With this problem I have seen that most people were using enum definition and access: and the method where the error occurs: Use stationary access instead of example: You can not use instance access for static member (methods and fields ), But not for the internal type. = where they
= = . What's my problem here?
com \ callmeyer \ jopp \ FieldCoordinator.java: 303: Unexpected type required: class, package found: variable if (event.getType () == event.Type.INSERT) {^
public class DataLayoutEvent {public static enum type {INSERT, DELETE, RENAME, MOVE, RESIZE} Private type type = faucet; Public type getType () {return type; } ...}
changed the public zero layout (DataLayoutEvent event) {if (event.getType () = = Event.Type.INSERT) {fieldAdded (event.getField), event.getToIndex ()); } ...
if (event.getType () == DataLayoutEvent.Type.INSERT) {
Comments
Post a Comment