Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated BaseRequestOptions.transform api (update for issue #2875) #3365

Merged
merged 1 commit into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public String apply(ParameterSpec input) {
.add(");\n")
.build());

if (methodToOverride.getSimpleName().toString().equals("transforms")) {
if (methodToOverride.getSimpleName().toString().contains("transform")
&& methodToOverride.isVarArgs()) {
result
.addModifiers(Modifier.FINAL)
.addAnnotation(SafeVarargs.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -558,6 +559,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -561,6 +562,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -552,6 +553,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -542,6 +543,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -552,6 +553,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -559,6 +560,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -559,6 +560,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,23 @@ public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap> tra
return (GlideRequest<TranscodeType>) super.transform(transformation);
}

/**
* @see GlideOptions#transform(Transformation<Bitmap>[])
*/
@NonNull
@CheckResult
@SuppressWarnings({
"unchecked",
"varargs"
})
public GlideRequest<TranscodeType> transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideRequest<TranscodeType>) super.transform(transformations);
}

/**
* @see GlideOptions#transforms(Transformation<Bitmap>[])
*/
@Deprecated
@NonNull
@CheckResult
@SuppressWarnings({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.Deprecated;
import java.lang.Override;
import java.lang.SafeVarargs;
import java.lang.SuppressWarnings;
Expand Down Expand Up @@ -559,6 +560,16 @@ public GlideOptions transform(@NonNull Transformation<Bitmap> transformation) {
@SuppressWarnings("varargs")
@NonNull
@CheckResult
public final GlideOptions transform(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transform(transformations);
}

@Override
@SafeVarargs
@SuppressWarnings("varargs")
@Deprecated
@NonNull
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... transformations) {
return (GlideOptions) super.transforms(transformations);
}
Expand Down
Loading