public final class ParameterizedTypeName extends TypeName
| Modifier and Type | Field | Description |
|---|---|---|
ClassName |
rawType |
|
List<TypeName> |
typeArguments |
| Modifier and Type | Method | Description |
|---|---|---|
ParameterizedTypeName |
annotated(List<AnnotationSpec> annotations) |
|
static ParameterizedTypeName |
get(ClassName rawType,
TypeName... typeArguments) |
Returns a parameterized type, applying
typeArguments to rawType. |
static ParameterizedTypeName |
get(Class<?> rawType,
Type... 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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitannotated, box, concatAnnotations, equals, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, toString, unboxpublic final ClassName rawType
public ParameterizedTypeName annotated(List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations in class TypeNamepublic 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 © 2019 Square, Inc.. All rights reserved.