Change getCanonicalName() to getName() in api