Replace a referenced object with another one. This is used by the AMF3 deserializer to handle circular references.

@param refId
reference id
@param newRef
replacement object
507899
protected void storeReference(int refId, Object newRef) {
        refMap.put(Integer.valueOf(refId), newRef);
    }
268327
public synchronized void addDeferredReferenceData(DeferredReferenceData refData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "addDeferredReferenceData", "this=" + this, refData);
        }

        if (deferredReferenceDatas == null) {
            deferredReferenceDatas = new LinkedHashMap<DeferredReferenceData, Boolean>();
            if (parent != null && deferredReferenceDataEnabled) {
                parent.addDeferredReferenceData(this);
            }
        }
        deferredReferenceDatas.put(refData, null);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "addDeferredReferenceData");
        }
    }
578737
function extractRefs(node, refs) {
  	var i, list;

  	if (node.t === REFERENCE) {
  		if (refs.indexOf(node.n) === -1) {
  			refs.unshift(node.n);
  		}
  	}

  	list = node.o || node.m;
  	if (list) {
  		if (isObject(list)) {
  			extractRefs(list, refs);
  		} else {
  			i = list.length;
  			while (i--) {
  				extractRefs(list[i], refs);
  			}
  		}
  	}

  	if (node.x) {
  		extractRefs(node.x, refs);
  	}

  	if (node.r) {
  		extractRefs(node.r, refs);
  	}

  	if (node.v) {
  		extractRefs(node.v, refs);
  	}
  }
952636
@Override
    public BaseNode visitNameRef(FEEL_1_1Parser.NameRefContext ctx) {
        return ASTBuilderFactory.newNameRefNode( ctx, BuiltInType.UNKNOWN );
    }
259365
function _getRef (refOrQuery) {
  if (typeof refOrQuery.ref === 'function') {
    refOrQuery = refOrQuery.ref()
  } else if (typeof refOrQuery.ref === 'object') {
    refOrQuery = refOrQuery.ref
  }

  return refOrQuery
}
819406
final public void addIdAndRef(Integer id, Long ref, int additionalId,
      long additionalRef) {
    if (id != null) {
      MtasTreeNodeId tnId = new MtasTreeNodeId(ref, additionalId,
          additionalRef);
      ids.put(id, tnId);
    }
  }
403076
def add_ref(self, ref):
        

        self.refs[ref.insn_addr].append(ref)
        self.data_addr_to_ref[ref.memory_data.addr].append(ref)
1303901
protected void setSerializationService(ServiceReference<SerializationService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setSerializationService", "setting " + ref);
        }
        serializationServiceRef.setReference(ref);
    }
1020654
public void setReferences(IReferences references) throws ReferenceException {
		List<Object> counters = references.getOptional(new Descriptor(null, "counters", null, null, null));
		for (Object counter : counters) {
			if (counter instanceof ICounters && counter != this)
				_counters.add((ICounters) counter);
		}
	}
1278765
function _assignRef(element) {
  var refString = element.getAttribute('ref');

  // assign element to refs object
  this.refs[ refString ] = element;

  // memoize ref string, clean ref attribute
  element.__refString__ = refString;
  element.removeAttribute('ref');
}
784574
private void addChildrenByRef(IdReferenceType idReference) {
        String id = idReference.getValue();
        if (id == null || id.isEmpty()) {
            log.debug("Invalid reference to policy or policyset ");
            return;
        }

        Object obj = policyFinder.lookup(id);

        if (obj instanceof PolicyType || obj instanceof PolicySetType) {
            children.add(obj);
        } else {
            log.debug("No policy/policyset found for the reference " + id);
        }
    }
109470
def rewrite_references( sequence, old, new, single_ref=False ):
    
    old,new = as_id(old),as_id(new)
    to_delete = []
    for i,n in enumerate(sequence):
        if n == old:
            if new is None:
                to_delete.append( i )
            else:
                sequence[i] = new 
                if single_ref:
                    new = None
        elif n == new and single_ref:
            new = None
    if to_delete:
        to_delete.reverse()
        for i in to_delete:
            del sequence[i]
    return sequence
104500
private void flattenReferencesTo(Name n, String alias) {
    String originalName = n.getFullName();
    for (Ref r : n.getRefs()) {
      if (r == n.getDeclaration()) {
        // Declarations are handled separately.
        continue;
      }
      Node rParent = r.getNode().getParent();
      // There are two cases when we shouldn't flatten a reference:
      // 1) Object literal keys, because duplicate keys show up as refs.
      // 2) References inside a complex assign. (a = x.y = 0). These are
      //    called TWIN references, because they show up twice in the
      //    reference list. Only collapse the set, not the alias.
      if (!NodeUtil.mayBeObjectLitKey(r.getNode()) && (r.getTwin() == null || r.isSet())) {
        flattenNameRef(alias, r.getNode(), rParent, originalName);
      } else if (r.getNode().isStringKey() && r.getNode().getParent().isObjectPattern()) {
        Node newNode = IR.name(alias).srcref(r.getNode());
        NodeUtil.copyNameAnnotations(r.getNode(), newNode);
        DestructuringGlobalNameExtractor.reassignDestructringLvalue(
            r.getNode(), newNode, null, r, compiler);
      }
    }

    // Flatten all occurrences of a name as a prefix of its subnames. For
    // example, if {@code n} corresponds to the name "a.b", then "a.b" will be
    // replaced with "a$b" in all occurrences of "a.b.c", "a.b.c.d", etc.
    if (n.props != null) {
      for (Name p : n.props) {
        flattenPrefixes(alias, p, 1);
      }
    }
  }
1118914
private Object refObj(Object obj, XmlParser.Node node) throws NoSuchMethodException,
            ClassNotFoundException, InvocationTargetException, IllegalAccessException
    {
        String id = node.getAttribute("id");
        obj = _idMap.get(id);
        if (obj == null) throw new IllegalStateException("No object for id=" + id);
        configure(obj, node, 0);
        return obj;
    }
1249272
public void setRef_id(String v) {
    if (BioVerb_Type.featOkTst && ((BioVerb_Type)jcasType).casFeat_ref_id == null)
      jcasType.jcas.throwFeatMissing("ref_id", "ch.epfl.bbp.uima.types.BioVerb");
    jcasType.ll_cas.ll_setStringValue(addr, ((BioVerb_Type)jcasType).casFeatCode_ref_id, v);}
1315079
@Reference(service = SerializationService.class)
    protected void setSerializationService(ServiceReference<SerializationService> ref) {
        serializationSvcRef.setReference(ref);
    }
1115556
def replace_references(self, node):
        
        href = node.getAttribute('href')
        if href is None:
            return
        id = href.getValue()
        ref = self.catalog.get(id)
        if ref is None:
            log.error('soap multiref: %s, not-resolved', id)
            return
        node.append(ref.children)
        node.setText(ref.getText())
        for a in ref.attributes:
            if a.name != 'id':
                node.append(a)
        node.remove(href)