code: protected Expression instantiate(Object oldInstance, Encoder out)
      {
          XMLEncoder xmlOut = (XMLEncoder)out;
          ControlBean control = (ControlBean)oldInstance;
  
          //
          // If processing a nested control, then use the parent bean's context as the
          // constructor context
          //
          ControlBeanContext cbc = null;
          if (xmlOut.getOwner() != null)
              cbc = ((ControlBean)xmlOut.getOwner()).getControlBeanContext();
  
          //
          // See if the ControlBean has any associated PropertyMap in its delegation chain
          // that was derived from an AnnotatedElement so this relationship (and any associated 
          // external config delegates) will be restored as part of the decoding process.
          //
          // BUGBUG: What about a user-created PropertyMap that was passed into the constructor?
          //
          AnnotatedElementMap aem = null;
          PropertyMap pMap = control.getPropertyMap();
          while (pMap != null)
          {
              if (pMap instanceof AnnotatedElementMap)
              {
                  aem = (AnnotatedElementMap)pMap;
  
                  //
                  // Ignore a class-valued AnnotationElementMap.. this just refers to the
                  // Control type, and will be automatically reassociated at construction
                  // time
                  //
                  if (aem.getAnnotatedElement() instanceof Class)
                      aem = null;
  
                  xmlOut.setPersistenceDelegate(AnnotatedElementMap.class,
                                                new AnnotatedElementMapPersistenceDelegate());
  
                  break;
              }
  
              pMap = pMap.getDelegateMap();
          }
  
  
          //
          // Create a constructor that that uses the following form:
          //      new <BeanClass>(ControlBeanContext cbc, String id, PropertyMap map)
          // The context is set to null, so the current active container context will be
          // used, the id will be the ID of the original control and the map will be
          // any AnnotatedElementMap that was passed into the original constructor.
          //
          return new Expression(control, control.getClass(), "new", 
                                new Object [] {cbc, control.getLocalID(), aem});
      }
docs: PersistenceDelegate.instantiate()