diff options
author | Aurimas Liutikas <aurimas@google.com> | 2021-05-12 22:53:00 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-12 22:53:00 +0000 |
commit | 8630738d0a775a2f8e5bc09c437556bd75d8b620 (patch) | |
tree | 6f59a75348d07612173246ac6c4fca04bde0df2c /java/dagger/hilt/processor/internal/AnnotationValues.java | |
parent | 0cd6a8551365e02a1687415356215ba2061739cd (diff) | |
parent | 5480a6c05f0c4727b3dd154709f40fdae8d8b4a2 (diff) | |
download | dagger2-8630738d0a775a2f8e5bc09c437556bd75d8b620.tar.gz |
Merge "Revert "Merge commit 'upstream/dagger-2.35.1^'"" am: 5882ce8935 am: 5480a6c05f
Original change: https://android-review.googlesource.com/c/platform/external/dagger2/+/1705751
Change-Id: I2f7a4d61b9f48965273925620a8dc0afc43c9bef
Diffstat (limited to 'java/dagger/hilt/processor/internal/AnnotationValues.java')
-rw-r--r-- | java/dagger/hilt/processor/internal/AnnotationValues.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/java/dagger/hilt/processor/internal/AnnotationValues.java b/java/dagger/hilt/processor/internal/AnnotationValues.java index 9ebeeebca..584d8f950 100644 --- a/java/dagger/hilt/processor/internal/AnnotationValues.java +++ b/java/dagger/hilt/processor/internal/AnnotationValues.java @@ -18,19 +18,15 @@ package dagger.hilt.processor.internal; import static com.google.auto.common.AnnotationMirrors.getAnnotationValue; import static com.google.auto.common.AnnotationMirrors.getAnnotationValuesWithDefaults; -import static com.google.auto.common.MoreTypes.asTypeElement; import static com.google.common.base.Preconditions.checkNotNull; -import static dagger.internal.codegen.extension.DaggerStreams.toImmutableSet; import com.google.auto.common.MoreTypes; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; import java.util.List; import java.util.Optional; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationValue; import javax.lang.model.element.AnnotationValueVisitor; -import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeMirror; @@ -91,18 +87,6 @@ public final class AnnotationValues { } } - /** Returns a class array value as a set of {@link TypeElement}. */ - public static ImmutableSet<TypeElement> getTypeElements(AnnotationValue value) { - return getAnnotationValues(value).stream() - .map(AnnotationValues::getTypeElement) - .collect(toImmutableSet()); - } - - /** Returns a class value as a {@link TypeElement}. */ - public static TypeElement getTypeElement(AnnotationValue value) { - return asTypeElement(getTypeMirror(value)); - } - /** * Returns the value as a VariableElement. * @@ -112,13 +96,6 @@ public final class AnnotationValues { return EnumVisitor.INSTANCE.visit(value); } - /** Returns a string array value as a set of strings. */ - public static ImmutableSet<String> getStrings(AnnotationValue value) { - return getAnnotationValues(value).stream() - .map(AnnotationValues::getString) - .collect(toImmutableSet()); - } - /** * Returns the value as a string. * @@ -128,15 +105,6 @@ public final class AnnotationValues { return valueOfType(value, String.class); } - /** - * Returns the value as a boolean. - * - * @throws IllegalArgumentException if the value is not a boolean. - */ - public static boolean getBoolean(AnnotationValue value) { - return valueOfType(value, Boolean.class); - } - private static <T> T valueOfType(AnnotationValue annotationValue, Class<T> type) { Object value = annotationValue.getValue(); if (!type.isInstance(value)) { |