Did you create these two methods? You've left out the bodies of these classes, so I can't check. I do know that they don't inherit these methods from KeyGeneratorSpi, so you will need to implement them.
Edit: I found the getInstance method inside class KeyGenerator, but that class has no direct relationship with KeyGeneratorSpi. As for a method called initialize that takes a KeyGenerator, there is none in the API.