Java Compile time interface changes
<p>I am new to Java, and have inherited an existing android app.  The original developer has chosen to use an Interface for Constants.</p>

<p>My problem is that I need to change a number of these constants to compile the App for Production vs Dev.  Everything works just fine if I modify a handful of values by hand, but that is just an ugly way to handle this, and I will probably make a mistake one day.</p>

<p>So, my goal is to find a solution that can be transparent to the remainder of the code, and use a single Constant to toggle back and forth between dev and production.</p>

<p>Sample of existing Code:</p>

<pre><code>package package.common;
public interface Consts {

    // Define the Build Type
    boolean PRODUCTION_BUILD = false;

    String BASE_URL   = "https://domain.com/Dev/Mobile.ashx";

    interface RSA {
        String PUBLIC_KEY_SHA1 = "....";
    }

}
</code></pre>

<p>and used like this</p>

<pre><code>import package.common.Consts;

public class HttpsConn extends NetConnection {

    String url = Consts.BASE_URL;

}
</code></pre>

<p>Is there a way to use a CONSTANT to modify this Interface at compile time?  Or am I going to have to bit the bullet and modify the code that uses this interface as part of the solution?</p>
