delegates.put(HashMap.class, pd); delegates.put(TreeMap.class, pd);
delegates.put(java.util.AbstractMap.class, pd);
  private static void setupDefaultPersistenceDelegates()  {    synchronized (delegates)      {        if (defaultPersistenceDelegate != null)          return;        delegates.put(Class.class, new ClassPersistenceDelegate());        PersistenceDelegate pd = new PrimitivePersistenceDelegate();        delegates.put(Boolean.class, pd);        delegates.put(Byte.class, pd);        delegates.put(Short.class, pd);        delegates.put(Integer.class, pd);        delegates.put(Long.class, pd);        delegates.put(Float.class, pd);        delegates.put(Double.class, pd);        delegates.put(Object[].class, new ArrayPersistenceDelegate());        pd = new CollectionPersistenceDelegate();        delegates.put(ArrayList.class, pd);        delegates.put(LinkedList.class, pd);        delegates.put(Vector.class, pd);        delegates.put(HashSet.class, pd);        delegates.put(LinkedHashSet.class, pd);        delegates.put(TreeSet.class, pd);                pd = new MapPersistenceDelegate();        delegates.put(HashMap.class, pd);        delegates.put(TreeMap.class, pd);        delegates.put(java.util.Hashtable.class, pd);        delegates.put(java.util.IdentityHashMap.class, pd);                delegates.put(java.util.LinkedHashMap.class, pd);        delegates.put(java.util.Properties.class, pd);        delegates.put(java.awt.RenderingHints.class, pd);        delegates.put(java.util.WeakHashMap.class, pd);        delegates.put(javax.swing.UIDefaults.class, pd);                // TODO: These classes need to be implemented first        //delegates.put(java.security.AuthProvider.class, pd);        //delegates.put(java.util.concurrent.ConcurrentHashMap.class, pd);        //delegates.put(java.util.EnumMap.class, pd);        //delegates.put(javax.management.openmbean.TabularDataSupport.class, pd);                defaultPersistenceDelegate = new DefaultPersistenceDelegate();        delegates.put(Object.class, defaultPersistenceDelegate);        // Creates a PersistenceDelegate implementation which is        // returned for 'null'. In practice this instance is        // not used in any way and is just here to be compatible        // with the reference implementation which returns a        // similar instance when calling getPersistenceDelegate(null) .        fakePersistenceDelegate = new PersistenceDelegate()        {          protected Expression instantiate(Object o, Encoder e)          {            return null;          }        };      }  }