m_argList.clear();
for (int nArg = 0, nArgCount = mapping.getArgumentCount(); nArg != nArgCount; ++nArg)
{
TransformationArgument arg = mapping.getArgument(nArg);
TransformationSource src = arg.getSource();
int nStartLevel = arg.getStartLevel();
Object value = getSourceObject(nStartLevel);
Object parent = getSourceObject(Math.max(0, nStartLevel - 1));
int nLevel;
for (nLevel = nStartLevel; nLevel < src.getLevel() && value != null && value != Undefined.VALUE; ++nLevel)
{
parent = value;
value = src.getPath(nLevel + 1).getPart().getValue((PropertyMap)parent, Undefined.VALUE);
}
if (value == null)
{
if (nLevel != src.getLevel() || !arg.isNull())
{
bMissing = true;
break;
}
}
else if (value == Undefined.VALUE)
{
if (nLevel != src.getLevel())
{
bMissing = true;
break;
}
Function fun = arg.getDefaultValueFunction();
if (fun == null)
{
bMissing = true;
break;
}
if (parent == Undefined.VALUE)
{
parent = null;
}
value = m_context.getMachine().invoke(fun, parent, (Object[])null);
}
m_argList.add(value);
}
if (!bMissing)
{
Object value;
if (mapping.getOrdinal() != 0)
{
value = m_context.getMachine().invoke(
(Function)m_scriptArray[mapping.getOrdinal()], m_argList);
}
else
{
value = m_argList.get(0);
}
if (value != Undefined.VALUE)
{
setDestination(mapping, source, value);
}
}
}
}
if (obj != null && obj != Undefined.VALUE)
{
int nChildCount = source.getChildCount();
if (nChildCount != 0)
{
PropertyMap tobj = (PropertyMap)obj;
for (int nChild = 0; nChild != nChildCount; ++nChild)
{
TransformationSource child = source.getChild(nChild);
if (child.isPrimary())
{
Object value = child.getPart().getValue(tobj, Undefined.VALUE);
if (value == null)
{
if (child.isNull())
{
transform(null, child);
}
}
else if (value == Undefined.VALUE)
{
if (child.isDefault())
{
transform(value, child);
}
}
else