{
ValueMetaData value;
if (o instanceof ValueMetaData)
value = (ValueMetaData) o;
else
value = new AbstractValueMetaData(o);
if (parent instanceof ValueMetaDataAware)
{
ValueMetaDataAware valueMetaDataAware = (ValueMetaDataAware) parent;
valueMetaDataAware.setValue(value);
}
else if (parent instanceof AbstractCollectionMetaData)
{
AbstractCollectionMetaData collection = (AbstractCollectionMetaData) parent;
collection.add(value);
}
else if (parent instanceof AbstractClassLoaderMetaData)
{
AbstractClassLoaderMetaData valueMetaData = (AbstractClassLoaderMetaData) parent;
valueMetaData.setClassLoader(value);
}
else
{
AbstractValueMetaData valueMetaData = (AbstractValueMetaData) parent;
valueMetaData.setValue(value);
}
}