Revert "Changed the HAL factories to work with JAVA generics"

This reverts commit 32e4718ab56101c465ffa1c7ac3df5f68977fa62.