// TODO: we could use CType for key validation too to make this unnecessary but
// it's unclear it would be a win overall
public CType getKeyValidatorAsCType()
{
return keyValidator instanceof CompositeType
? new CompoundCType(((CompositeType) keyValidator).types)
: new SimpleCType(keyValidator);
}