*/
@SuppressWarnings("all")
public class WrappingUtil {
public static IMongoBean wrap(final DBObject dbObject) {
try {
IMongoBean _xblockexpression = null;
{
Object _get = dbObject.get(IMongoBean.JAVA_CLASS_KEY);
String _string = null;
if (_get!=null) {
_string=_get.toString();
}
final String javaClassName = _string;
ClassLoader _classLoader = WrappingUtil.getClassLoader();
final Class<?> javaClass = _classLoader.loadClass(javaClassName);
IMongoBean _xifexpression = null;
boolean _isAssignableFrom = IMongoBean.class.isAssignableFrom(javaClass);
if (_isAssignableFrom) {
IMongoBean _xblockexpression_1 = null;
{
final Constructor<?> constructor = javaClass.getConstructor(DBObject.class);
Object _newInstance = constructor.newInstance(dbObject);
_xblockexpression_1 = ((IMongoBean) _newInstance);
}