Typing generic arrays returned by GPEntity.getComponentsWithType() to be of the type of the parameter passed