Reference r = null; Object name =null; if (cdParent instanceof ComponentDescription){ r = ((ComponentDescription)cdParent).sfCompleteName(); name = ((ComponentDescription)cdParent).sfAttributeKeyFor(this);  } else if (cdParent instanceof ComponentDescription){ try { r = ((Prim)cdParent).sfCompleteName(); name = ((Prim)cdParent).sfAttributeKeyFor(this);  } 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;
return sfCompleteName;
    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;    }