public final class ParameterizedTypeName extends TypeName
| Modifier and Type | Field and Description |
|---|---|
private ParameterizedTypeName |
enclosingType |
ClassName |
rawType |
java.util.List<TypeName> |
typeArguments |
| Modifier | Constructor and Description |
|---|---|
(package private) |
ParameterizedTypeName(ParameterizedTypeName enclosingType,
ClassName rawType,
java.util.List<TypeName> typeArguments) |
private |
ParameterizedTypeName(ParameterizedTypeName enclosingType,
ClassName rawType,
java.util.List<TypeName> typeArguments,
java.util.List<AnnotationSpec> annotations) |
| Modifier and Type | Method and Description |
|---|---|
ParameterizedTypeName |
annotated(java.util.List<AnnotationSpec> annotations) |
(package private) CodeWriter |
emit(CodeWriter out) |
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. |
(package private) static ParameterizedTypeName |
get(java.lang.reflect.ParameterizedType type,
java.util.Map<java.lang.reflect.Type,TypeVariableName> map)
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, arrayComponent, box, concatAnnotations, emitAnnotations, equals, get, get, get, get, hashCode, isAnnotated, isBoxedPrimitive, isPrimitive, list, list, toString, unboxprivate final ParameterizedTypeName enclosingType
public final ClassName rawType
public final java.util.List<TypeName> typeArguments
ParameterizedTypeName(ParameterizedTypeName enclosingType, ClassName rawType, java.util.List<TypeName> typeArguments)
private ParameterizedTypeName(ParameterizedTypeName enclosingType, ClassName rawType, java.util.List<TypeName> typeArguments, java.util.List<AnnotationSpec> annotations)
public ParameterizedTypeName annotated(java.util.List<AnnotationSpec> annotations)
public TypeName withoutAnnotations()
withoutAnnotations in class TypeNameCodeWriter emit(CodeWriter out) throws java.io.IOException
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.static ParameterizedTypeName get(java.lang.reflect.ParameterizedType type, java.util.Map<java.lang.reflect.Type,TypeVariableName> map)
type.