public void collectNeededEntities(NeededEntities needs) { if (!isGlobalVariable(target)) needs.add(target); if (getNext() != null) { getNext().collectNeededEntities(needs); } }
/** @see de.unika.ipd.grgen.ir.Expression#collectNeededEntities() */ public void collectNeededEntities(NeededEntities needs) { if (owner != null) { if (!isGlobalVariable(owner) && !(owner.getType() instanceof MatchType)) { if (owner instanceof GraphEntity) needs.addAttr((GraphEntity) owner, member); else needs.add((Variable) owner); } } else { ownerExpr.collectNeededEntities(needs); } }
public void collectNeededEntities(NeededEntities needs) { Entity entity = target.getOwner(); if (!isGlobalVariable(entity)) needs.add((GraphEntity) entity); // Temporarily do not collect variables for target HashSet<Variable> varSet = needs.variables; needs.variables = null; target.collectNeededEntities(needs); needs.variables = varSet; if (getNext() != null) { getNext().collectNeededEntities(needs); } }