public final class ParameterizedTypeName extends TypeName
Modifier and Type | Field and Description |
---|---|
ClassName |
rawType |
List<TypeName> |
typeArguments |
Modifier and Type | Method and Description |
---|---|
ParameterizedTypeName |
annotated(List<AnnotationSpec> annotations) |
static ParameterizedTypeName |
get(Class<?> rawType,
Type... typeArguments)
Returns a parameterized type, applying
typeArguments to rawType . |
static ParameterizedTypeName |
get(ClassName rawType,
TypeName... typeArguments)
Returns a parameterized type, applying
typeArguments to rawType . |
static ParameterizedTypeName |
get(ParameterizedType type)
Returns a parameterized type equivalent to
type . |
ParameterizedTypeName |
nestedClass(String name)
Returns a new
ParameterizedTypeName instance for the specified name as nested
inside this class. |
ParameterizedTypeName |
nestedClass(String name,
List<TypeName> typeArguments)
Returns a new
ParameterizedTypeName instance for the specified name as nested
inside this class, with the specified typeArguments . |
TypeName |
withoutAnnotations() |
annotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unbox
public final ClassName rawType
public ParameterizedTypeName annotated(List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations
in class TypeName
public ParameterizedTypeName nestedClass(String name)
ParameterizedTypeName
instance for the specified name
as nested
inside this class.public ParameterizedTypeName nestedClass(String name, List<TypeName> typeArguments)
ParameterizedTypeName
instance for the specified name
as nested
inside this class, with the specified typeArguments
.public static ParameterizedTypeName get(ClassName rawType, TypeName... typeArguments)
typeArguments
to rawType
.public static ParameterizedTypeName get(Class<?> rawType, Type... typeArguments)
typeArguments
to rawType
.public static ParameterizedTypeName get(ParameterizedType type)
type
.Copyright © 2018 Square, Inc.. All rights reserved.