Object cdParent = sfResolveParent(); if (cdParent == null) {  return new Reference();
if (sfCompleteName==null) {  Object cdParent = sfResolveParent(); if (cdParent == null) { return new Reference(); }  Reference r = null; Object key = null; if (cdParent instanceof ComponentDescription){ r = ((ComponentDescription)cdParent).sfCompleteName(); key = ((ComponentDescription)cdParent).sfAttributeKeyFor(this); } else if (cdParent instanceof Prim){ try { r = ((Prim)cdParent).sfCompleteName(); key = ((Prim)cdParent).sfAttributeKeyFor(this); } catch (RemoteException ex) { if ((sfLog()!= null) && sfLog().isErrorEnabled()) sfLog().err(ex.getMessage(),ex); else ex.printStackTrace(); } } else { return new Reference(); }  sfCompleteName= (Reference)r.clone();  if (key!=null) { sfCompleteName.addElement(ReferencePart.here(key)); } else { sfCompleteName.addElement(new HereReferencePart("*unknown*")); if (sfLog().isTraceEnabled()){ sfLog().trace("Internal error generating CD complete name - child not named in parent yet"); } }
    public Reference sfCompleteName() {        //System.out.println("getting CD sfCompleteName");        Object cdParent = sfResolveParent();        if (cdParent == null) {            //System.out.println("CD with NO parent");            return new Reference();        }        Reference r = null;        Object name =null;        if (cdParent instanceof ComponentDescription){            r = ((ComponentDescription)cdParent).sfCompleteName();            name = ((ComponentDescription)cdParent).sfAttributeKeyFor(this);            //System.out.println("CD with CD parent: "+r.toString()+" : "+name);        } else if (cdParent instanceof ComponentDescription){            try {                r = ((Prim)cdParent).sfCompleteName();                name = ((Prim)cdParent).sfAttributeKeyFor(this);                //System.out.println("CD with PRIM parent: "+r.toString()+" : "+name);            } catch (RemoteException ex) {                if ((sfLog()!= null) && sfLog().isErrorEnabled()) sfLog().err(ex.getMessage(),ex);                else ex.printStackTrace();            }        } else {            return new Reference();        }        if (name != null) {            r.addElement(ReferencePart.here(name));        }        return r;    }