MutableTypeParameterElement extends MutableAnnotatedConstruct<MutableTypeParameterElement> implements BareTypeParameterElement { public static MutableTypeParameterElement fromTypeVariable(TypeVariable<?> original, CopyOption... copyOptions) { return new MutableTypeParameterElement(original, copyOptions); } MutableTypeParameterElement(); private  MutableTypeParameterElement(TypeVariable<?> original, CopyOption[] copyOptions);  MutableTypeParameterElement(BareTypeParameterElement original, CopyOption[] copyOptions); static MutableTypeParameterElement fromTypeVariable(TypeVariable<?> original, CopyOption... copyOptions); @Nullable static MutableTypeParameterElement copyOf(@Nullable BareTypeParameterElement original,
            CopyOption... copyOptions); @Override boolean equals(@Nullable Object otherObject); @Override int hashCode(); @Override String toString(); @XmlElement(name = "simple-name") @Override @Nullable SimpleName getSimpleName(); MutableTypeParameterElement setSimpleName(@Nullable SimpleName simpleName); MutableTypeParameterElement setSimpleName(String simpleName); @XmlElementWrapper(name = "bounds") @XmlElementRef @Override List<MutableTypeMirror<?>> getBounds(); MutableTypeParameterElement setBounds(List<MutableTypeMirror<?>> bounds);  }
@Test public void fromTypeVariable() { TypeVariable<?> typeVariable = MutableLocatable.class.getTypeParameters()[0]; MutableTypeParameterElement actual = MutableTypeParameterElement.fromTypeVariable(typeVariable); MutableTypeParameterElement expected = new MutableTypeParameterElement() .setSimpleName(typeVariable.getName()) .setBounds(Collections.<MutableTypeMirror<?>>singletonList( new MutableDeclaredType() .setDeclaration(MutableLocatable.class.getName()) .setTypeArguments(Collections.<MutableTypeMirror<?>>singletonList( new MutableTypeVariable() .setFormalTypeParameter(typeVariable.getName()) )) )); Assert.assertEquals(actual, expected); }