Package com.squareup.javapoet
Class ParameterizedTypeName
- java.lang.Object
-
- com.squareup.javapoet.TypeName
-
- com.squareup.javapoet.ParameterizedTypeName
-
public final class ParameterizedTypeName extends TypeName
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterizedTypeNameannotated(List<AnnotationSpec> annotations)static ParameterizedTypeNameget(ClassName rawType, TypeName... typeArguments)Returns a parameterized type, applyingtypeArgumentstorawType.static ParameterizedTypeNameget(Class<?> rawType, Type... typeArguments)Returns a parameterized type, applyingtypeArgumentstorawType.static ParameterizedTypeNameget(ParameterizedType type)Returns a parameterized type equivalent totype.ParameterizedTypeNamenestedClass(String name)Returns a newParameterizedTypeNameinstance for the specifiednameas nested inside this class.ParameterizedTypeNamenestedClass(String name, List<TypeName> typeArguments)Returns a newParameterizedTypeNameinstance for the specifiednameas nested inside this class, with the specifiedtypeArguments.TypeNamewithoutAnnotations()-
Methods inherited from class com.squareup.javapoet.TypeName
annotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unbox
-
-
-
-
Method Detail
-
annotated
public ParameterizedTypeName annotated(List<AnnotationSpec> annotations)
-
withoutAnnotations
public TypeName withoutAnnotations()
- Overrides:
withoutAnnotationsin classTypeName
-
nestedClass
public ParameterizedTypeName nestedClass(String name)
Returns a newParameterizedTypeNameinstance for the specifiednameas nested inside this class.
-
nestedClass
public ParameterizedTypeName nestedClass(String name, List<TypeName> typeArguments)
Returns a newParameterizedTypeNameinstance for the specifiednameas nested inside this class, with the specifiedtypeArguments.
-
get
public static ParameterizedTypeName get(ClassName rawType, TypeName... typeArguments)
Returns a parameterized type, applyingtypeArgumentstorawType.
-
get
public static ParameterizedTypeName get(Class<?> rawType, Type... typeArguments)
Returns a parameterized type, applyingtypeArgumentstorawType.
-
get
public static ParameterizedTypeName get(ParameterizedType type)
Returns a parameterized type equivalent totype.
-
-