JType implements Type, Type.ArrayType { @Override public boolean is(String fullyQualifiedName) { return fullyQualifiedName.equals(this.fullyQualifiedName()); } JType(JSema sema, ITypeBinding typeBinding); @Override boolean is(String fullyQualifiedName); @Override boolean isSubtypeOf(String fullyQualifiedName); @Override boolean isSubtypeOf(Type superType); @Override boolean isArray(); @Override boolean isClass(); @Override boolean isVoid(); @Override boolean isPrimitive(); @Override boolean isPrimitive(Primitives primitive); @Override boolean isUnknown(); @Override boolean isNumerical(); @Override String fullyQualifiedName(); @Override String name(); @Override String toString(); @Override Symbol.TypeSymbol symbol(); @Override Type erasure(); @Override Type elementType(); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isParameterized(); @Override List<Type> typeArguments();  }
@Test void name_of_parameterized_type() { JavaTree.CompilationUnitTreeImpl cu = test("interface I { java.util.List<String> m(); }"); ClassTreeImpl c = (ClassTreeImpl) cu.types().get(0); MethodTreeImpl m = (MethodTreeImpl) c.members().get(0); AbstractTypedTree e = Objects.requireNonNull((AbstractTypedTree) m.returnType()); JType parameterizedType = cu.sema.type(Objects.requireNonNull(e.typeBinding)); assertThat(parameterizedType) .hasSameNameAs(e.symbolType()) .hasSameNameAs(cu.sema.typeSymbol(e.typeBinding).type()) .is("java.util.List") .hasName("List"); }