code: synchronized public void setDependency(String objectName,
  			String dependencyName) throws EvaluationException {
  
  		// Determine if adding this dependency will create a cycle.
  		String nextObjectName = dependencies.get(dependencyName);
  		while (nextObjectName != null) {
  			if (objectName.equals(nextObjectName)) {
  				throw EvaluationException.create(
  						MSG_CIRCULAR_OBJECT_DEPENDENCY, getCycle(objectName,
  								dependencyName));
  			}
  			nextObjectName = dependencies.get(nextObjectName);
  		}
  
  		// If we get to here, then we reached the end of the chain without
  		// creating a cycle. It is OK to add this to the dependencies.
  		dependencies.put(objectName, dependencyName);
  
  		// To avoid deadlock, ensure that the number of available threads is
  		// larger than number of entries in the dependencies.
  		compiler.ensureMinimumBuildThreadLimit(dependencies.size() + 1);
  	}
docs: This method will set the given dependency in the map which holds them.
  This method will throw an exception if the specified dependency would
  create a cycle in the dependency map. In this case, the dependency will
  not be inserted.
  
  Note: This method MUST be synchronized to ensure that the entire cycle
  calculation occurs with the dependency map in a consistent state.
  
  @param objectName
  name of the object which has the dependency
  @param dependencyName
  name of the object objectName depends on
  
  @throws EvaluationException when an error occurs during the evaluation of the dependency