Is there any way to create inner enum with an access to my instance variables?
An enum
is a compile time construct (predefined), and therefore any external data inside of one must be readily available to the compiler before runtime.
Unless you explicitly pass the variable (or some reference containing it, in your case this
) down to the method inside the enum
, you won't be able to reference it.