private Type[] createTypeParameterTypes(TypeParameterElement[] typeParameters) {
int typeParameterCount = typeParameters.length;
Type[] typeArguments = new Type[typeParameterCount];
for (int i = 0; i < typeParameterCount; i++) {
TypeParameterElementImpl typeParameter = (TypeParameterElementImpl) typeParameters[i];
TypeParameterTypeImpl typeParameterType = new TypeParameterTypeImpl(typeParameter);
typeParameter.setType(typeParameterType);
typeArguments[i] = typeParameterType;
}
return typeArguments;
}