{
setSourceObject(source.getLevel(), obj);
for (int nMapping = 0, nMappingCount = source.getMappingCount(); nMapping != nMappingCount; ++nMapping)
{
TransformationMapping mapping = source.getMapping(nMapping);
if (mapping.getDestinationCount() != 0)
{
boolean bMissing = false;
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);
}