if (subtype instanceof LeafrefTypeDefinition) {
addLeafrefValueCodec(unionCls, unionType, bindingCodecContext, values, subtype);
} else {
if (subtype instanceof LeafrefTypeDefinition) {
addLeafrefValueCodec(unionCls, unionType, bindingCodecContext, values, subtype);
} else {