the question is: why do you need the whole thing?
Why not reimplement (if really needed) the ItemStack functions? so you would be compatible to existing code.