public final class ParameterizedTypeName extends TypeName
Modifier and Type | Field and Description |
---|---|
ClassName |
rawType |
java.util.List<TypeName> |
typeArguments |
Modifier and Type | Method and Description |
---|---|
ParameterizedTypeName |
annotated(java.util.List<AnnotationSpec> annotations) |
static ParameterizedTypeName |
get(java.lang.Class<?> rawType,
java.lang.reflect.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(java.lang.reflect.ParameterizedType type)
Returns a parameterized type equivalent to
type . |
ParameterizedTypeName |
nestedClass(java.lang.String name)
Returns a new
ParameterizedTypeName instance for the specified name as nested
inside this class. |
ParameterizedTypeName |
nestedClass(java.lang.String name,
java.util.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 final java.util.List<TypeName> typeArguments
public ParameterizedTypeName annotated(java.util.List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations
in class TypeName
public ParameterizedTypeName nestedClass(java.lang.String name)
ParameterizedTypeName
instance for the specified name
as nested
inside this class.public ParameterizedTypeName nestedClass(java.lang.String name, java.util.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(java.lang.Class<?> rawType, java.lang.reflect.Type... typeArguments)
typeArguments
to rawType
.public static ParameterizedTypeName get(java.lang.reflect.ParameterizedType type)
type
.Copyright © 2020 Square, Inc.. All Rights Reserved.