static void resolve(Proto proto, LinkedHashMap<String, Object> source,
            LinkedHashMap<String, Object> destination, String enclosingNamespace)
    {
        // we iterate this way (no EntrySet) to avoid concurrent modification exception
        // if the source and destination are the same.
        String[] keys = source.keySet().toArray(new String[source.size()]);
        for (String key : keys)
        {
            Object val = source.get(key);
            if (val instanceof String)
            {
                String refName = (String) val;
                String ns = enclosingNamespace == null ? proto.getPackageName() :
                        enclosingNamespace;

                HasName hn = proto.findReference(refName, ns);

                if (hn != null)
                    destination.put(key, hn);
                else if (RESOLVE_ENUM_VALUE_REF)
                {
                    int dot = refName.lastIndexOf('.');
                    if (dot > 0)
                    {
                        String egName = refName.substring(0, dot);
                        hn = proto.findReference(egName, ns);
                        if (hn instanceof EnumGroup)
                        {
                            EnumGroup eg = (EnumGroup) hn;
                            EnumGroup.Value v = eg.getValue(refName.substring(dot + 1));
                            if (v != null)
                                destination.put(key, v);
                        }
                    }
                }
            }
        }
    }
The reference configured via options and annotations.

@author David Yu
@created Dec 22, 2011
protostuff-parser/src/main/java/io/protostuff/parser/ConfiguredReference.java