My code consists of references to enumeration in the following fashion.
Flowers { ROSE, SUNFLOWER }
import com.mycompany.Flowers;
class A {
public void foo(...) {
Flowers flower = Flowers.ROSE;
}
}
I would like the above code to use static references to Flowers, the code would then look like
import static com.mycompany.Flowers.ROSE;
Flowers flower = ROSE;
How can I re-factor my code (using Eclipse) to use static references of enums instead of the normal referencing mechanism. Is there a way to tell Eclipse to modify all regular enum references to static references?