if (m_value == null || m_value instanceof Collection) { return null; } else { Adapter ad = gen.getRoot().getAdapter(m_value.getClass()); if (ad == null) { return null; } ObjectType type = ad.getObjectType(m_value); Root root = gen.getRoot(); if (root.hasObjectMap(type)) { return root.getObjectMap(type); } else { return new ObjectMap(type); } }
return map(gen, m_value);
    private ObjectMap map(Generator gen) {        if (m_value == null || m_value instanceof Collection) {            return null;        } else {            Adapter ad = gen.getRoot().getAdapter(m_value.getClass());            if (ad == null) { return null; }            ObjectType type = ad.getObjectType(m_value);            Root root = gen.getRoot();            if (root.hasObjectMap(type)) {                return root.getObjectMap(type);            } else {                return new ObjectMap(type);            }        }    }