Get the spell or ability selection by player

I am trying to learn Java and Xmage and am hoping for a little help.
I borrowed code from Bestow and Riot to get a mutate creature to attach to a non-Human controlled creature.
I know this is not how mutate should work but I'm using this as an exercise to learn xmage code.
How do I Get the 'spell or ability' selection chosen by player to cast a card?
I tried many ways to get this, getManaCost(), getSpellAbilityType(), etc, but can't find the solution.
Any help in pointing me in the right direction would be greatly appreciated.
Thanks in advance,
Gary
p.s. I am new user and site won't let me post the full code snippet.
public boolean replaceEvent(GameEvent event, Ability source, Game game)
.
I borrowed code from Bestow and Riot to get a mutate creature to attach to a non-Human controlled creature.
I know this is not how mutate should work but I'm using this as an exercise to learn xmage code.
How do I Get the 'spell or ability' selection chosen by player to cast a card?
I tried many ways to get this, getManaCost(), getSpellAbilityType(), etc, but can't find the solution.
Any help in pointing me in the right direction would be greatly appreciated.
Thanks in advance,
Gary
p.s. I am new user and site won't let me post the full code snippet.
public boolean replaceEvent(GameEvent event, Ability source, Game game)
.