diff --git a/core/src/com/google/inject/RestrictedBindingSource.java b/core/src/com/google/inject/RestrictedBindingSource.java index 9da035c3a..216e165bb 100644 --- a/core/src/com/google/inject/RestrictedBindingSource.java +++ b/core/src/com/google/inject/RestrictedBindingSource.java @@ -62,6 +62,7 @@ import java.lang.annotation.Target; * } * * @author vzm@google.com (Vladimir Makaric) + * @since 5.0 */ @Inherited @Retention(RUNTIME) @@ -78,6 +79,8 @@ public @interface RestrictedBindingSource { * Meta-annotation indicating that the target annotation is a permit for binding restricted * bindings. Annotating a binding source (defined in top-level javadoc) with a permit gives it * permission to bind the restricted bindings guarded by the permit (see {@link #permits}). + * + * @since 5.0 */ @Documented @Retention(RUNTIME) @@ -103,7 +106,11 @@ public @interface RestrictedBindingSource { */ String exemptModules() default ""; - /** Level of restriction. Determines how violations are handled. */ + /** + * Level of restriction. Determines how violations are handled. + * + * @since 5.0 + */ public static enum RestrictionLevel { WARNING, ERROR; diff --git a/core/src/com/google/inject/spi/BindingSourceRestriction.java b/core/src/com/google/inject/spi/BindingSourceRestriction.java index fb3ebb8d4..16dd62d6c 100644 --- a/core/src/com/google/inject/spi/BindingSourceRestriction.java +++ b/core/src/com/google/inject/spi/BindingSourceRestriction.java @@ -13,6 +13,7 @@ import com.google.inject.RestrictedBindingSource; import com.google.inject.RestrictedBindingSource.RestrictionLevel; import com.google.inject.internal.Errors; import com.google.inject.internal.GuiceInternal; +import java.util.regex.Pattern; import java.lang.annotation.Annotation; import java.util.ArrayDeque; import java.util.Arrays; @@ -22,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.regex.Pattern; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Stream; @@ -45,6 +45,7 @@ import java.util.stream.StreamSupport; * which happens on a single thread. * * @author vzm@google.com (Vladimir Makaric) + * @since 5.0 */ public final class BindingSourceRestriction { private BindingSourceRestriction() {} diff --git a/core/src/com/google/inject/spi/Elements.java b/core/src/com/google/inject/spi/Elements.java index 2497664bc..61f7f736d 100644 --- a/core/src/com/google/inject/spi/Elements.java +++ b/core/src/com/google/inject/spi/Elements.java @@ -125,6 +125,8 @@ public final class Elements { * *

Using Binder.withSource is not trustworthy because it's a public API that external users can * use to spoof the original ElementSource of a binding by calling withSource(bogusElementSource). + * + * @since 5.0 */ public static Binder withTrustedSource( GuiceInternal guiceInternal, Binder binder, Object source) { diff --git a/core/src/com/google/inject/spi/ErrorDetail.java b/core/src/com/google/inject/spi/ErrorDetail.java index 8e41b1174..48657f63d 100644 --- a/core/src/com/google/inject/spi/ErrorDetail.java +++ b/core/src/com/google/inject/spi/ErrorDetail.java @@ -13,6 +13,8 @@ import java.util.Optional; * errors. * *

WARNING: The class and its APIs are still experimental and subject to change. + * + * @since 5.0 */ public abstract class ErrorDetail> implements Serializable { private final String message; diff --git a/core/src/com/google/inject/spi/InjectionPoint.java b/core/src/com/google/inject/spi/InjectionPoint.java index a7f3ca45f..88c925ba3 100644 --- a/core/src/com/google/inject/spi/InjectionPoint.java +++ b/core/src/com/google/inject/spi/InjectionPoint.java @@ -282,6 +282,7 @@ public final class InjectionPoint { * @throws ConfigurationException if there is no injectable constructor, more than one injectable * constructor, or if parameters of the injectable constructor are malformed, such as a * parameter with multiple binding annotations. + * @since 5.0 */ public static InjectionPoint forConstructorOf(TypeLiteral type, boolean atInjectRequired) { Class rawType = getRawType(type.getType()); @@ -873,6 +874,8 @@ public final class InjectionPoint { /** * Returns all the annotations on a field. If Kotlin-support is enabled, the annotations will * include annotations on the related Kotlin-property. + * + * @since 5.0 */ public static Annotation[] getAnnotations(Field field) { Annotation[] javaAnnotations = field.getAnnotations(); diff --git a/core/src/com/google/inject/spi/Message.java b/core/src/com/google/inject/spi/Message.java index e05e09e9a..44e988617 100644 --- a/core/src/com/google/inject/spi/Message.java +++ b/core/src/com/google/inject/spi/Message.java @@ -152,7 +152,11 @@ public final class Message implements Serializable, Element { binder.withSource(getSource()).addError(this); } - /** Returns a copy of this {@link Message} with its sources replaced. */ + /** + * Returns a copy of this {@link Message} with its sources replaced. + * + * @since 5.0 + */ public Message withSource(List newSources) { return new Message(errorId, errorDetail.withSources(newSources)); } diff --git a/extensions/assistedinject/src/com/google/inject/assistedinject/FactoryModuleBuilder.java b/extensions/assistedinject/src/com/google/inject/assistedinject/FactoryModuleBuilder.java index ba8e24363..61ad9bd53 100644 --- a/extensions/assistedinject/src/com/google/inject/assistedinject/FactoryModuleBuilder.java +++ b/extensions/assistedinject/src/com/google/inject/assistedinject/FactoryModuleBuilder.java @@ -311,6 +311,8 @@ public final class FactoryModuleBuilder { *

Guice will try to work properly even if this method is not called (or called with a lookups * that doesn't have access to the factory), but doing so requires reflection into the JDK, which * may break at any time (and trigger unsafe access warnings). + * + * @since 5.0 */ public FactoryModuleBuilder withLookups(MethodHandles.Lookup lookups) { this.lookups = lookups; diff --git a/extensions/dagger-adapter/src/com/google/inject/daggeradapter/DaggerAdapter.java b/extensions/dagger-adapter/src/com/google/inject/daggeradapter/DaggerAdapter.java index 3bec9e1f2..31adea48a 100644 --- a/extensions/dagger-adapter/src/com/google/inject/daggeradapter/DaggerAdapter.java +++ b/extensions/dagger-adapter/src/com/google/inject/daggeradapter/DaggerAdapter.java @@ -87,7 +87,11 @@ public final class DaggerAdapter { return new Builder(); } - /** Builder for setting configuration options on DaggerAdapter. */ + /** + * Builder for setting configuration options on DaggerAdapter. + * + * @since 5.0 + */ public static class Builder { private final ImmutableList.Builder modules = ImmutableList.builder(); private Predicate predicate = Predicates.alwaysTrue(); diff --git a/extensions/testlib/src/com/google/inject/testing/fieldbinder/BoundFieldModule.java b/extensions/testlib/src/com/google/inject/testing/fieldbinder/BoundFieldModule.java index 8bc415dca..d0e1c36b3 100644 --- a/extensions/testlib/src/com/google/inject/testing/fieldbinder/BoundFieldModule.java +++ b/extensions/testlib/src/com/google/inject/testing/fieldbinder/BoundFieldModule.java @@ -135,6 +135,8 @@ public final class BoundFieldModule implements Module { * bindings), create an instance of an anonymous class extending this one and annotate it with * those permits. For example: {@code new @Permit1 @Permit2 BoundFieldModule.WithPermits(instance) * {}}. + * + * @since 5.0 */ public static class WithPermits extends AbstractModule { private final Object instance;