Make constants final classes instead of interfaces

This commit prohibits implementation of the empty interface and
instantiation of the class.  Refer to _Effective Java_ item 19 for
more background.
This commit is contained in:
Andrew Gaul 2014-05-16 09:49:16 -07:00
parent f6a7bba3d6
commit c94d11f900
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import com.google.common.annotations.Beta;
/**
* @author David Alves
*/
public interface GoogleComputeEngineConstants {
public final class GoogleComputeEngineConstants {
public static final String GCE_PROVIDER_NAME = "google-compute-engine";
@ -77,4 +77,8 @@ public interface GoogleComputeEngineConstants {
* The suffix we append to auto-created boot disk names.
*/
public static final String GCE_BOOT_DISK_SUFFIX = "boot-disk";
private GoogleComputeEngineConstants() {
throw new AssertionError("intentionally unimplemented");
}
}