diff options
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)) { |