The main idea of IntDef annotation is to use set of int constants like an enum, but without enum. In this case you have to declare all constants manually.
@IntDef({Status.IDLE, Status.PROCESSING, Status.DONE, Status.CANCELLED})
@Retention(RetentionPolicy.SOURCE)
@interface Status {
int IDLE = 0;
int PROCESSING = 1;
int DONE = 2;
int CANCELLED = 3;
}
You can see detailed example here.