From 70cf3e1f7c72aea0c9b69200982cd99bf52279b1 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 16 May 2014 09:25:41 -0700 Subject: [PATCH] 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. --- .../cloudsigma/reference/CloudSigmaConstants.java | 7 +++++-- .../cloudwatch/domain/AutoScalingConstants.java | 5 ++++- .../cloudwatch/domain/DynamoDBConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/EBSConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/EC2Constants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/ELBConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/EMRConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/RDSConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/SNSConstants.java | 5 ++++- .../org/jclouds/cloudwatch/domain/SQSConstants.java | 5 ++++- .../cloudwatch/domain/StorageGatewayConstants.java | 5 ++++- .../org/jclouds/ec2/reference/EC2Constants.java | 5 ++++- .../reference/ElasticStackConstants.java | 7 +++++-- .../filesystem/reference/FilesystemConstants.java | 7 +++++-- .../java/org/jclouds/s3/reference/S3Constants.java | 5 ++++- .../org/jclouds/aws/reference/AWSConstants.java | 6 +++++- .../openstack/swift/reference/SwiftConstants.java | 13 ++++++++----- .../jclouds/vcloud/reference/VCloudConstants.java | 5 ++++- .../blobstore/reference/BlobStoreConstants.java | 5 ++++- .../compute/reference/ComputeServiceConstants.java | 6 +++++- core/src/main/java/org/jclouds/Constants.java | 6 +++++- .../location/reference/LocationConstants.java | 6 +++++- .../reference/LoadBalancerConstants.java | 5 ++++- .../jclouds/aws/ec2/reference/AWSEC2Constants.java | 5 ++++- .../jclouds/glesys/reference/GleSYSConstants.java | 6 +++++- .../reference/HPCloudObjectStorageConstants.java | 6 +++++- .../softlayer/reference/SoftLayerConstants.java | 5 ++++- 27 files changed, 121 insertions(+), 34 deletions(-) diff --git a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/reference/CloudSigmaConstants.java b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/reference/CloudSigmaConstants.java index 535c3616bc..46f36ea49e 100644 --- a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/reference/CloudSigmaConstants.java +++ b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/reference/CloudSigmaConstants.java @@ -20,11 +20,14 @@ package org.jclouds.cloudsigma.reference; * * @author Adrian Cole */ -public class CloudSigmaConstants { +public final class CloudSigmaConstants { /** * default VNC password used on new machines */ public static final String PROPERTY_VNC_PASSWORD = "jclouds.cloudsigma.vnc-password"; - + + private CloudSigmaConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/AutoScalingConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/AutoScalingConstants.java index 17e0c91913..d018309db9 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/AutoScalingConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/AutoScalingConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface AutoScalingConstants { +public final class AutoScalingConstants { public static class Dimension { @@ -43,4 +43,7 @@ public interface AutoScalingConstants { } + private AutoScalingConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/DynamoDBConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/DynamoDBConstants.java index fc80d12744..3b2db87f9d 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/DynamoDBConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/DynamoDBConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface DynamoDBConstants { +public final class DynamoDBConstants { public static class Dimension { @@ -44,4 +44,7 @@ public interface DynamoDBConstants { } + private DynamoDBConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EBSConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EBSConstants.java index 17b39db38c..f7eb806aae 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EBSConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EBSConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface EBSConstants { +public final class EBSConstants { public static class Dimension { @@ -44,4 +44,7 @@ public interface EBSConstants { } + private EBSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EC2Constants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EC2Constants.java index cebbb3a108..07e08353e8 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EC2Constants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EC2Constants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface EC2Constants { +public final class EC2Constants { public static class Dimension { @@ -46,4 +46,7 @@ public interface EC2Constants { } + private EC2Constants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/ELBConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/ELBConstants.java index 429bcbeb6f..9e695bc43e 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/ELBConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/ELBConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface ELBConstants { +public final class ELBConstants { public static class Dimension { @@ -47,4 +47,7 @@ public interface ELBConstants { } + private ELBConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EMRConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EMRConstants.java index 39fee2e673..1bafc10eeb 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EMRConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/EMRConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface EMRConstants { +public final class EMRConstants { public static class Dimension { @@ -60,4 +60,7 @@ public interface EMRConstants { } + private EMRConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/RDSConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/RDSConstants.java index 4b6ab1093d..ab4627567e 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/RDSConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/RDSConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface RDSConstants { +public final class RDSConstants { public static class Dimension { @@ -51,4 +51,7 @@ public interface RDSConstants { } + private RDSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SNSConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SNSConstants.java index c28e759106..9ce597f73e 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SNSConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SNSConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface SNSConstants { +public final class SNSConstants { public static class Dimension { @@ -40,4 +40,7 @@ public interface SNSConstants { } + private SNSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SQSConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SQSConstants.java index fdd10d8597..4dc1c2a4db 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SQSConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/SQSConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface SQSConstants { +public final class SQSConstants { public static class Dimension { @@ -44,4 +44,7 @@ public interface SQSConstants { } + private SQSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StorageGatewayConstants.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StorageGatewayConstants.java index a1299c8ae7..cf985f0ece 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StorageGatewayConstants.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StorageGatewayConstants.java @@ -23,7 +23,7 @@ package org.jclouds.cloudwatch.domain; * * @author Jeremy Whitlock */ -public interface StorageGatewayConstants { +public final class StorageGatewayConstants { public static class Dimension { @@ -52,4 +52,7 @@ public interface StorageGatewayConstants { } + private StorageGatewayConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java b/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java index 0d4578952a..7c848eb47b 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/reference/EC2Constants.java @@ -22,7 +22,7 @@ package org.jclouds.ec2.reference; * * @author Adrian Cole */ -public interface EC2Constants { +public class EC2Constants { /** * Listing the universe of amis is extremely expensive. set this to a comma separated value of * the ami owners you wish to use in {@link ComputeService} @@ -46,4 +46,7 @@ public interface EC2Constants { */ public static final String PROPERTY_EC2_GENERATE_INSTANCE_NAMES = "jclouds.ec2.generate-instance-names"; + protected EC2Constants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/reference/ElasticStackConstants.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/reference/ElasticStackConstants.java index fb377af599..eb0bd34483 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/reference/ElasticStackConstants.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/reference/ElasticStackConstants.java @@ -21,11 +21,14 @@ package org.jclouds.elasticstack.reference; * * @author Adrian Cole */ -public class ElasticStackConstants { +public final class ElasticStackConstants { /** * default VNC password used on new machines */ public static final String PROPERTY_VNC_PASSWORD = "jclouds.elasticstack.vnc-password"; - + + private ElasticStackConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/reference/FilesystemConstants.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/reference/FilesystemConstants.java index f16f260b5b..c8ef8c5c6e 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/reference/FilesystemConstants.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/reference/FilesystemConstants.java @@ -21,9 +21,12 @@ package org.jclouds.filesystem.reference; * * @author Alfredo "Rainbowbreeze" Morresi */ -public class FilesystemConstants { +public final class FilesystemConstants { /** Specify the base directory where provider starts its file operations - must exists */ public static final String PROPERTY_BASEDIR = "jclouds.filesystem.basedir"; - + + private FilesystemConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/s3/src/main/java/org/jclouds/s3/reference/S3Constants.java b/apis/s3/src/main/java/org/jclouds/s3/reference/S3Constants.java index 8d5da8a5ea..5bbe82e22b 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/reference/S3Constants.java +++ b/apis/s3/src/main/java/org/jclouds/s3/reference/S3Constants.java @@ -21,7 +21,7 @@ package org.jclouds.s3.reference; * * @author Adrian Cole */ -public interface S3Constants { +public final class S3Constants { /** * S3 service's XML Namespace, as used in XML request and response documents. @@ -34,4 +34,7 @@ public interface S3Constants { public static final String PROPERTY_S3_SERVICE_PATH = "jclouds.s3.service-path"; public static final String PROPERTY_S3_VIRTUAL_HOST_BUCKETS = "jclouds.s3.virtual-host-buckets"; + private S3Constants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/sts/src/main/java/org/jclouds/aws/reference/AWSConstants.java b/apis/sts/src/main/java/org/jclouds/aws/reference/AWSConstants.java index c022ef42dc..f9d053d3f6 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/reference/AWSConstants.java +++ b/apis/sts/src/main/java/org/jclouds/aws/reference/AWSConstants.java @@ -21,8 +21,12 @@ package org.jclouds.aws.reference; * * @author Adrian Cole */ -public interface AWSConstants { +public final class AWSConstants { public static final String PROPERTY_ZONECLIENT_ENDPOINT = "jclouds.aws.zoneclient-endpoint"; public static final String PROPERTY_AUTH_TAG = "jclouds.aws.auth.tag"; public static final String PROPERTY_HEADER_TAG = "jclouds.aws.header.tag"; + + private AWSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/reference/SwiftConstants.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/reference/SwiftConstants.java index f82f625f2b..7b365a1b16 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/reference/SwiftConstants.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/reference/SwiftConstants.java @@ -22,23 +22,26 @@ package org.jclouds.openstack.swift.reference; * * @author Adrian Cole */ -public interface SwiftConstants { +public final class SwiftConstants { /** * For an integer value N, limits the number of results to at most N values. */ - String LIMIT = "limit"; + public static final String LIMIT = "limit"; /** * Given a string value X, return Object names greater in value than the specified marker. */ - String MARKER = "marker"; + public static final String MARKER = "marker"; /** * For a string value X, causes the results to be limited to Object names beginning with the * substring X. */ - String PREFIX = "prefix"; + public static final String PREFIX = "prefix"; /** * For a string value X, return the Object names nested in the pseudo path. */ - String PATH = "path"; + public static final String PATH = "path"; + private SwiftConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java index 4c93a72637..9334a703d7 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/reference/VCloudConstants.java @@ -21,7 +21,7 @@ package org.jclouds.vcloud.reference; * * @author Adrian Cole */ -public interface VCloudConstants { +public final class VCloudConstants { public static final String PROPERTY_VCLOUD_VERSION_SCHEMA = "jclouds.vcloud.version.schema"; /** * name of the default org that your vApp will join, if an org isn't @@ -48,4 +48,7 @@ public interface VCloudConstants { public static final String PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED = "jclouds.vcloud.timeout.task-complete"; + private VCloudConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/blobstore/src/main/java/org/jclouds/blobstore/reference/BlobStoreConstants.java b/blobstore/src/main/java/org/jclouds/blobstore/reference/BlobStoreConstants.java index d20772f0f0..ba3608acb9 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/reference/BlobStoreConstants.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/reference/BlobStoreConstants.java @@ -25,7 +25,7 @@ import com.google.common.collect.ImmutableList; * * @author Adrian Cole */ -public interface BlobStoreConstants { +public final class BlobStoreConstants { /** *

* To interoperate with other S3 tools, we also accept the following: @@ -57,4 +57,7 @@ public interface BlobStoreConstants { public static final String BLOBSTORE_LOGGER = "jclouds.blobstore"; + private BlobStoreConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/compute/src/main/java/org/jclouds/compute/reference/ComputeServiceConstants.java b/compute/src/main/java/org/jclouds/compute/reference/ComputeServiceConstants.java index 9665fe2471..a997b583a3 100644 --- a/compute/src/main/java/org/jclouds/compute/reference/ComputeServiceConstants.java +++ b/compute/src/main/java/org/jclouds/compute/reference/ComputeServiceConstants.java @@ -43,7 +43,7 @@ import com.google.inject.Inject; * * @author Adrian Cole */ -public interface ComputeServiceConstants { +public final class ComputeServiceConstants { public static final String COMPUTE_LOGGER = "jclouds.compute"; public static final String LOCAL_PARTITION_GB_PATTERN = "disk_drive/%s/gb"; @@ -131,4 +131,8 @@ public interface ComputeServiceConstants { @Named(TIMEOUT_IMAGE_AVAILABLE) public long imageAvailable = TimeUnit.MINUTES.toMillis(45); } + + private ComputeServiceConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/core/src/main/java/org/jclouds/Constants.java b/core/src/main/java/org/jclouds/Constants.java index 45d77cf566..6310813312 100644 --- a/core/src/main/java/org/jclouds/Constants.java +++ b/core/src/main/java/org/jclouds/Constants.java @@ -24,7 +24,7 @@ import org.jclouds.location.reference.LocationConstants; * * @author Adrian Cole */ -public interface Constants { +public final class Constants { /** * Integer property. default (0) *

@@ -304,4 +304,8 @@ public interface Constants { * The maximum number of blob deletes happening in parallel at any point in time. */ public static final String PROPERTY_MAX_PARALLEL_DELETES = "jclouds.max-parallel-deletes"; + + private Constants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/core/src/main/java/org/jclouds/location/reference/LocationConstants.java b/core/src/main/java/org/jclouds/location/reference/LocationConstants.java index 66ecdac7ae..2c069c63d7 100644 --- a/core/src/main/java/org/jclouds/location/reference/LocationConstants.java +++ b/core/src/main/java/org/jclouds/location/reference/LocationConstants.java @@ -20,11 +20,15 @@ package org.jclouds.location.reference; * * @author Adrian Cole */ -public interface LocationConstants { +public final class LocationConstants { public static final String ENDPOINT = "endpoint"; public static final String ISO3166_CODES = "iso3166-codes"; public static final String PROPERTY_REGIONS = "jclouds.regions"; public static final String PROPERTY_REGION = "jclouds.region"; public static final String PROPERTY_ZONES = "jclouds.zones"; public static final String PROPERTY_ZONE = "jclouds.zone"; + + private LocationConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/loadbalancer/src/main/java/org/jclouds/loadbalancer/reference/LoadBalancerConstants.java b/loadbalancer/src/main/java/org/jclouds/loadbalancer/reference/LoadBalancerConstants.java index 67bd6c85cb..ca914d527a 100644 --- a/loadbalancer/src/main/java/org/jclouds/loadbalancer/reference/LoadBalancerConstants.java +++ b/loadbalancer/src/main/java/org/jclouds/loadbalancer/reference/LoadBalancerConstants.java @@ -20,8 +20,11 @@ package org.jclouds.loadbalancer.reference; * * @author Adrian Cole */ -public interface LoadBalancerConstants { +public final class LoadBalancerConstants { public static final String LOADBALANCER_LOGGER = "jclouds.loadbalancer"; + private LoadBalancerConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/reference/AWSEC2Constants.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/reference/AWSEC2Constants.java index d2cc3c7805..55f26b7071 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/reference/AWSEC2Constants.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/reference/AWSEC2Constants.java @@ -23,7 +23,7 @@ import org.jclouds.ec2.reference.EC2Constants; * * @author Adrian Cole */ -public interface AWSEC2Constants extends EC2Constants { +public final class AWSEC2Constants extends EC2Constants { /** * expression to find amis that work on the cluster instance type
* ex. {@code @@ -36,4 +36,7 @@ public interface AWSEC2Constants extends EC2Constants { public static final String PROPERTY_EC2_CC_REGIONS = "jclouds.ec2.cc-regions"; public static final String PROPERTY_EC2_AMI_QUERY = "jclouds.ec2.ami-query"; + private AWSEC2Constants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/reference/GleSYSConstants.java b/providers/glesys/src/main/java/org/jclouds/glesys/reference/GleSYSConstants.java index d830a2cd24..22d6b3934a 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/reference/GleSYSConstants.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/reference/GleSYSConstants.java @@ -28,7 +28,7 @@ import org.jclouds.compute.domain.ComputeMetadata; * * @author Adam Lowe */ -public class GleSYSConstants { +public final class GleSYSConstants { public static final Pattern JCLOUDS_ID_TO_PLATFORM = Pattern.compile("([a-zA-Z]+) .*"); @@ -40,4 +40,8 @@ public class GleSYSConstants { } return matcher.group(1); } + + private GleSYSConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/reference/HPCloudObjectStorageConstants.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/reference/HPCloudObjectStorageConstants.java index 0716a36f00..f8229c6db9 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/reference/HPCloudObjectStorageConstants.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/reference/HPCloudObjectStorageConstants.java @@ -22,9 +22,13 @@ package org.jclouds.hpcloud.objectstorage.reference; * * @author Jeremy Daggett */ -public interface HPCloudObjectStorageConstants { +public final class HPCloudObjectStorageConstants { /** * The CDN Endpoint property */ public static final String PROPERTY_CDN_ENDPOINT = "jclouds.hpcloud-objectstorage.cdn.endpoint"; + + private HPCloudObjectStorageConstants() { + throw new AssertionError("intentionally unimplemented"); + } } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java index a55e40b59b..05fa2cee28 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/reference/SoftLayerConstants.java @@ -21,7 +21,7 @@ package org.jclouds.softlayer.reference; * * @author Adrian Cole */ -public interface SoftLayerConstants { +public final class SoftLayerConstants { /** * Name of the product package corresponding to cloud servers @@ -53,4 +53,7 @@ public interface SoftLayerConstants { */ public static final String PROPERTY_SOFTLAYER_VIRTUALGUEST_PRICES = "jclouds.softlayer.virtualguest.prices"; + private SoftLayerConstants() { + throw new AssertionError("intentionally unimplemented"); + } }