Package com.squareup.javapoet
Class ParameterizedTypeName
java.lang.Object
com.squareup.javapoet.TypeName
com.squareup.javapoet.ParameterizedTypeName
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments) private
ParameterizedTypeName
(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments, List<AnnotationSpec> annotations) -
Method Summary
Modifier and TypeMethodDescriptionannotated
(List<AnnotationSpec> annotations) (package private) CodeWriter
emit
(CodeWriter out) static ParameterizedTypeName
Returns a parameterized type, applyingtypeArguments
torawType
.static ParameterizedTypeName
Returns a parameterized type, applyingtypeArguments
torawType
.static ParameterizedTypeName
get
(ParameterizedType type) Returns a parameterized type equivalent totype
.(package private) static ParameterizedTypeName
get
(ParameterizedType type, Map<Type, TypeVariableName> map) Returns a parameterized type equivalent totype
.nestedClass
(String name) Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class.nestedClass
(String name, List<TypeName> typeArguments) Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
.Methods inherited from class com.squareup.javapoet.TypeName
annotated, arrayComponent, box, concatAnnotations, emitAnnotations, equals, get, get, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, list, list, toString, unbox
-
Field Details
-
enclosingType
-
rawType
-
typeArguments
-
-
Constructor Details
-
ParameterizedTypeName
ParameterizedTypeName(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments) -
ParameterizedTypeName
private ParameterizedTypeName(ParameterizedTypeName enclosingType, ClassName rawType, List<TypeName> typeArguments, List<AnnotationSpec> annotations)
-
-
Method Details
-
annotated
-
withoutAnnotations
- Overrides:
withoutAnnotations
in classTypeName
-
emit
- Overrides:
emit
in classTypeName
- Throws:
IOException
-
nestedClass
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class. -
nestedClass
Returns a newParameterizedTypeName
instance for the specifiedname
as nested inside this class, with the specifiedtypeArguments
. -
get
Returns a parameterized type, applyingtypeArguments
torawType
. -
get
Returns a parameterized type, applyingtypeArguments
torawType
. -
get
Returns a parameterized type equivalent totype
. -
get
Returns a parameterized type equivalent totype
.
-