diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java index 16d2af6f4580..bbe7c99ea0fa 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java @@ -94,6 +94,12 @@ public enum Type { private final Long expirationTime; private final Long lastModifiedTime; + /** + * Base builder for tables. + * + * @param the table type. + * @param the table builder. + */ public abstract static class Builder> { private String etag; diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java index 6d7efc147d25..e05bbf488733 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java @@ -32,6 +32,8 @@ * a table. Use {@link QueryJobInfo} for a job that runs a query. * * @see Jobs + * + * @param the statistics type. */ public abstract class JobInfo implements Serializable { @@ -87,6 +89,13 @@ public enum WriteDisposition { private final S statistics; private final String userEmail; + /** + * Base builder for jobs. + * + * @param the job type. + * @param the job statistics type. + * @param the job builder. + */ public abstract static class Builder> { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/BaseService.java b/gcloud-java-core/src/main/java/com/google/gcloud/BaseService.java index 7600d25411fd..a7edc86c0d7d 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/BaseService.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/BaseService.java @@ -16,6 +16,11 @@ package com.google.gcloud; +/** + * Base class for service objects. + * + * @param the {@code ServiceOptions} subclass corresponding to the service. + */ public abstract class BaseService> implements Service { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/Page.java b/gcloud-java-core/src/main/java/com/google/gcloud/Page.java index 2819b56a17a0..bb4d1f8b951e 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/Page.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/Page.java @@ -40,6 +40,8 @@ * } * page = page.nextPage(); * }} + * + * @param the value type that the page holds. */ public interface Page { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/PageImpl.java b/gcloud-java-core/src/main/java/com/google/gcloud/PageImpl.java index 1c7a61ec471f..9524aaa4c69b 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/PageImpl.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/PageImpl.java @@ -25,6 +25,8 @@ /** * Base implementation for Google Cloud paginated results. + * + * @param the value type that the page holds. */ public class PageImpl implements Page, Serializable { @@ -34,6 +36,11 @@ public class PageImpl implements Page, Serializable { private final Iterable results; private final NextPageFetcher pageFetcher; + /** + * Interface for fetching the next page of results from the service. + * + * @param the value type that the page holds. + */ public interface NextPageFetcher extends Serializable { Page nextPage(); } diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/Restorable.java b/gcloud-java-core/src/main/java/com/google/gcloud/Restorable.java index 51391e33bd7d..fdac020331ed 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/Restorable.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/Restorable.java @@ -33,6 +33,8 @@ * X restorableObj = state.restore(); * ... * } + * + * @param the restorable object's type. */ public interface Restorable> { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/RestorableState.java b/gcloud-java-core/src/main/java/com/google/gcloud/RestorableState.java index 0c60411cb285..18e9d8bc502e 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/RestorableState.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/RestorableState.java @@ -22,6 +22,8 @@ * * Implementations of this class must implement {@link java.io.Serializable} to ensure that the * state of a the object can be correctly serialized. + * + * @param the restored object's type. */ public interface RestorableState> { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/Service.java b/gcloud-java-core/src/main/java/com/google/gcloud/Service.java index 2748c55058b4..b54705b9f0af 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/Service.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/Service.java @@ -16,6 +16,11 @@ package com.google.gcloud; +/** + * Interface for service objects. + * + * @param the {@code ServiceOptions} subclass corresponding to the service. + */ public interface Service> { OptionsT options(); } diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java index 3828bf30260b..6226fdb504c3 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java @@ -19,8 +19,11 @@ /** * A base interface for all service factories. * - * Implementation must provide a public no-arg constructor. + *

Implementation must provide a public no-arg constructor. * Loading of a factory implementation is done via {@link java.util.ServiceLoader}. + * + * @param the service subclass. + * @param the {@code ServiceOptions} subclass corresponding to the service. */ @SuppressWarnings("rawtypes") public interface ServiceFactory { diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java index 862d3f7b533d..588c041eb602 100644 --- a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java +++ b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java @@ -53,6 +53,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Abstract class representing service options. + * + * @param the service subclass. + * @param the spi-layer class corresponding to the service. + * @param the {@code ServiceOptions} subclass corresponding to the service. + */ public abstract class ServiceOptions, ServiceRpcT, OptionsT extends ServiceOptions> implements Serializable { @@ -150,6 +157,14 @@ private Object readResolve() throws ObjectStreamException { } } + /** + * Builder for {@code ServiceOptions}. + * + * @param the service subclass. + * @param the spi-layer class corresponding to the service. + * @param the {@code ServiceOptions} subclass corresponding to the service. + * @param the {@code ServiceOptions} builder. + */ protected abstract static class Builder, ServiceRpcT, OptionsT extends ServiceOptions, B extends Builder> { diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseKey.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseKey.java index 3add6bae67c4..a8ad7d4e7734 100644 --- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseKey.java +++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseKey.java @@ -31,7 +31,7 @@ /** * Base class for keys. */ -abstract class BaseKey extends Serializable { +public abstract class BaseKey extends Serializable { private static final long serialVersionUID = -4671243265877410635L; @@ -39,7 +39,12 @@ abstract class BaseKey extends Serializable { private final transient String namespace; private final transient ImmutableList path; - abstract static class Builder> { + /** + * Base class for key builders. + * + * @param the key builder. + */ + protected abstract static class Builder> { String projectId; String namespace; diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/StructuredQuery.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/StructuredQuery.java index 7b2312c85fc8..293c17cf3c57 100644 --- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/StructuredQuery.java +++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/StructuredQuery.java @@ -609,7 +609,13 @@ public static Projection first(String property) { } } - static class BaseBuilder> { + /** + * Base class for StructuredQuery builders. + * + * @param the type of result the query returns. + * @param the query builder. + */ + protected static class BaseBuilder> { private final ResultType resultType; private String namespace; diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ValueBuilder.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ValueBuilder.java index f5b5d4c1319b..a867ef25b321 100644 --- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ValueBuilder.java +++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ValueBuilder.java @@ -18,6 +18,10 @@ /** * A common interface for Value builders. + * + * @param the data type that the {@code Value} object holds. + * @param

the value type. + * @param the value type's associated builder. */ public interface ValueBuilder, B extends ValueBuilder> {