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 ParameterizedTypeName
annotated(List<AnnotationSpec> annotations)
static ParameterizedTypeName
get(ClassName rawType, TypeName... typeArguments)
Returns a parameterized type, applyingtypeArguments
torawType
.static ParameterizedTypeName
get(Class<?> rawType, Type... typeArguments)
Returns a parameterized type, applyingtypeArguments
torawType
.static ParameterizedTypeName
get(ParameterizedType type)
Returns a parameterized type equivalent totype
.ParameterizedTypeName
nestedClass(String name)
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class.ParameterizedTypeName
nestedClass(String name, List<TypeName> typeArguments)
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
.TypeName
withoutAnnotations()
-
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:
withoutAnnotations
in classTypeName
-
nestedClass
public ParameterizedTypeName nestedClass(String name)
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class.
-
nestedClass
public ParameterizedTypeName nestedClass(String name, List<TypeName> typeArguments)
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
.
-
get
public static ParameterizedTypeName get(ClassName rawType, TypeName... typeArguments)
Returns a parameterized type, applyingtypeArguments
torawType
.
-
get
public static ParameterizedTypeName get(Class<?> rawType, Type... typeArguments)
Returns a parameterized type, applyingtypeArguments
torawType
.
-
get
public static ParameterizedTypeName get(ParameterizedType type)
Returns a parameterized type equivalent totype
.
-
-