public class GenericUtils extends Object
| Constructor and Description |
|---|
GenericUtils() |
| Modifier and Type | Method and Description |
|---|---|
Map<TypeVariable<?>,Type> |
getMatchingTypeParameters(GenericArrayType p1,
GenericArrayType p2) |
static Map<TypeVariable<?>,Type> |
getMatchingTypeParameters(ParameterizedType p1,
ParameterizedType p2)
TODO: Try to match p2 superclasses?
|
static boolean |
isAssignable(Type type,
TypeVariable<?> typeVariable) |
static Type |
replaceTypeVariable(Type targetType,
TypeVariable<?> variable,
Type variableType) |
static Type |
replaceTypeVariables(Type targetType,
Map<TypeVariable<?>,Type> typeMap) |
static Type |
replaceTypeVariablesWithWildcards(Type targetType) |
public static boolean isAssignable(Type type, TypeVariable<?> typeVariable)
public static Type replaceTypeVariables(Type targetType, Map<TypeVariable<?>,Type> typeMap)
public static Type replaceTypeVariablesWithWildcards(Type targetType)
public static Type replaceTypeVariable(Type targetType, TypeVariable<?> variable, Type variableType)
public Map<TypeVariable<?>,Type> getMatchingTypeParameters(GenericArrayType p1, GenericArrayType p2)
public static Map<TypeVariable<?>,Type> getMatchingTypeParameters(ParameterizedType p1, ParameterizedType p2)
p1 - Desired TypeVariable assignmentp2 - Generic type with the TypeVariables that need assignmentCopyright © 2010–2017 EvoSuite. All rights reserved.