@Test public void asTypeParameterElement() { Element typeParameterElement = getOnlyElement( compilation .getElements() .getTypeElement(List.class.getCanonicalName()) .getTypeParameters()); assertThat(MoreElements.asTypeParameter(typeParameterElement)).isEqualTo(typeParameterElement); }
public static TypeParameterElement asTypeParameter(Element element) { return element.accept(TypeParameterElementVisitor.INSTANCE, null); }
MoreElements { public static TypeParameterElement asTypeParameter(Element element) { return element.accept(TypeParameterElementVisitor.INSTANCE, null); } }
MoreElements { public static TypeParameterElement asTypeParameter(Element element) { return element.accept(TypeParameterElementVisitor.INSTANCE, null); } private  MoreElements(); }
MoreElements { public static TypeParameterElement asTypeParameter(Element element) { return element.accept(TypeParameterElementVisitor.INSTANCE, null); } private  MoreElements(); static PackageElement getPackage(Element element); static PackageElement asPackage(Element element); static boolean isType(Element element); static TypeElement asType(Element element); static TypeParameterElement asTypeParameter(Element element); static VariableElement asVariable(Element element); static ExecutableElement asExecutable(Element element); static boolean isAnnotationPresent(Element element,
      Class<? extends Annotation> annotationClass); static Optional<AnnotationMirror> getAnnotationMirror(Element element,
      Class<? extends Annotation> annotationClass); static Predicate<T> hasModifiers(Modifier... modifiers); static Predicate<T> hasModifiers(final Set<Modifier> modifiers); @Deprecated static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(
      TypeElement type, Elements elementUtils); static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(
      TypeElement type, Types typeUtils, Elements elementUtils); static boolean overrides(
      ExecutableElement overrider,
      ExecutableElement overridden,
      TypeElement type,
      Types typeUtils); static ImmutableSet<ExecutableElement> getAllMethods(
      TypeElement type, Types typeUtils, Elements elementUtils); }
MoreElements { public static TypeParameterElement asTypeParameter(Element element) { return element.accept(TypeParameterElementVisitor.INSTANCE, null); } private  MoreElements(); static PackageElement getPackage(Element element); static PackageElement asPackage(Element element); static boolean isType(Element element); static TypeElement asType(Element element); static TypeParameterElement asTypeParameter(Element element); static VariableElement asVariable(Element element); static ExecutableElement asExecutable(Element element); static boolean isAnnotationPresent(Element element,
      Class<? extends Annotation> annotationClass); static Optional<AnnotationMirror> getAnnotationMirror(Element element,
      Class<? extends Annotation> annotationClass); static Predicate<T> hasModifiers(Modifier... modifiers); static Predicate<T> hasModifiers(final Set<Modifier> modifiers); @Deprecated static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(
      TypeElement type, Elements elementUtils); static ImmutableSet<ExecutableElement> getLocalAndInheritedMethods(
      TypeElement type, Types typeUtils, Elements elementUtils); static boolean overrides(
      ExecutableElement overrider,
      ExecutableElement overridden,
      TypeElement type,
      Types typeUtils); static ImmutableSet<ExecutableElement> getAllMethods(
      TypeElement type, Types typeUtils, Elements elementUtils);  }