In Java, how to iterate on the constants of an interface?
<p>in an interface, I store constants in this way (I'd like to know what you think of this practice). This is just a dummy example.</p>

<pre><code>interface HttpConstants {
    /** 2XX: generally "OK" */
    public static final int HTTP_OK = 200;
    public static final int HTTP_CREATED = 201;
    public static final int HTTP_ACCEPTED = 202;
    public static final int HTTP_NOT_AUTHORITATIVE = 203;
    public static final int HTTP_NO_CONTENT = 204;
    public static final int HTTP_RESET = 205;
    public static final int HTTP_PARTIAL = 206;

        ...
}
</code></pre>

<p>Is there a way I can iterate over all constants declared in this interface ? </p>
