I see what you mean, but I can't use getClassType() on object.getBaseObject().getXClass(getXWikiContext()).get(fieldName) because this is a PropertyInterface object and getClassType() is defined for BaseProperty objects and I can't cast it to a BaseProperty object. So is there another way to do that, or am I missing something ?
BTW it seems that only PasswordMetaClass has been turned into a component, and not PasswordClass, so if we redefine the password implementation wouldn't just the MetaClass change ?