while (expected.isArray()) {
expected = expected.getComponentType();
generifiedType = generifiedType.getComponentType();
}
if (expected.isGenericsPlaceHolder()) {
placeholders.put(expected.getGenericsTypes()[0].getName(), new GenericsType(generifiedType));
} else {
GenericsType[] expectedGenericsTypes = expected.getGenericsTypes();
GenericsType[] foundGenericsTypes = generifiedType.getGenericsTypes();
for (int i = 0; i < expectedGenericsTypes.length; i++) {
final GenericsType type = expectedGenericsTypes[i];
if (type.isPlaceholder()) {
String name = type.getName();
placeholders.put(name, foundGenericsTypes[i]);
}
}
}
}