Skip to content

Commit

Permalink
Deprecate Releasable references
Browse files Browse the repository at this point in the history
See #1117

RELNOTES=Deprecate `dagger.releasablereferences`

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193093600
  • Loading branch information
ronshapiro committed Apr 19, 2018
1 parent e3e28b1 commit 4aa6eff
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@
* }</pre>
*
* @since 2.8
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@GwtIncompatible
@Deprecated
public final class AndroidMemorySensitiveReferenceManager {

private final Set<TypedReleasableReferenceManager<ReleaseReferencesAt>> managers;
Expand Down
4 changes: 4 additions & 0 deletions java/dagger/android/ReleaseReferencesAt.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@
* {@link android.app.Application#onTrimMemory(int)} to it.
*
* @since 2.8
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@Documented
@GwtIncompatible
@Target(ANNOTATION_TYPE)
@CanReleaseReferences
@Deprecated
public @interface ReleaseReferencesAt {
/**
* If {@link AndroidMemorySensitiveReferenceManager#onTrimMemory(int)} is called with a value
Expand Down
4 changes: 4 additions & 0 deletions java/dagger/releasablereferences/CanReleaseReferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@
* not compatible with <a href="http://www.gwtproject.org/">GWT</a>.
*
* @since 2.8
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@Documented
@GwtIncompatible
@Target(ANNOTATION_TYPE)
@Deprecated
public @interface CanReleaseReferences {}
4 changes: 4 additions & 0 deletions java/dagger/releasablereferences/ForReleasableReferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@
*
* @see <a href="https://google.github.io/dagger/users-guide.html#releasable-references">Releasable references</a>
* @since 2.8
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@Documented
@GwtIncompatible
@Target({FIELD, PARAMETER, METHOD})
@Retention(RUNTIME)
@Qualifier
@Deprecated
public @interface ForReleasableReferences {
/** The {@linkplain CanReleaseReferences reference-releasing} scope annotation type. */
Class<? extends Annotation> value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@
* <p>This interface is implemented by Dagger.
*
* @since 2.8
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@GwtIncompatible
@Deprecated
public interface ReleasableReferenceManager {

/** The scope whose references are managed by this object. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
* <p>This interface is implemented by Dagger.
*
* @param <M> the type of the metadata annotation
* @deprecated The releasable references feature is deprecated and scheduled for removal in July
* 2018. If you use it or are planning to add usages, please
* <a href="https://github.com/google/dagger/issues/1117">this bug</a>.
*/
@Beta
@GwtIncompatible
@Deprecated
public interface TypedReleasableReferenceManager<M extends Annotation>
extends ReleasableReferenceManager {

Expand Down

0 comments on commit 4aa6eff

Please sign in to comment.