@NotNull private Map<String,Object> computeParameterValues(@NotNull Map<String,Object> staticValues) throws CircularParameterDependencyException {
  Map<String,Object> computedValues=Maps.newHashMapWithExpectedSize(myComputedParameters.size() + staticValues.size());
  computedValues.putAll(staticValues);
  for (  Parameter parameter : myComputedParameters) {
    computedValues.put(parameter.id,"");
  }
  final int maxIterations=2 * myComputedParameters.size();
  Map<String,Object> updatedValues=ImmutableMap.of();
  for (int i=0; i <= maxIterations; i++) {
    updatedValues=computeUpdatedValues(computedValues);
    if (updatedValues.isEmpty()) {
      return computedValues;
    }
 else {
      computedValues.putAll(updatedValues);
    }
  }
  throw new CircularParameterDependencyException(updatedValues.keySet());
}

@ NotNull private Map < String , Object > computeParameterValues ( @ NotNull Map < String , Object > staticValues ) throws CircularParameterDependencyException { Map < String , Object > computedValues = Maps . newHashMapWithExpectedSize ( myComputedParameters . size ( ) + staticValues . size ( ) ) ; computedValues . putAll ( staticValues ) ; for ( Parameter parameter : myComputedParameters ) { computedValues . put ( parameter . id , "" ) ; } final int maxIterations = 2 * myComputedParameters . size ( ) ; Map < String , Object > updatedValues = ImmutableMap . of ( ) ; for ( int i = 0 ; i <= maxIterations ; i ++ ) { updatedValues = computeUpdatedValues ( computedValues ) ; if ( updatedValues . isEmpty ( ) ) { return computedValues ; } else { computedValues . putAll ( updatedValues ) ; } } throw new CircularParameterDependencyException ( updatedValues . keySet ( ) ) ; }
computes values of the parameters with non - static default values . these parameters may depend on other computable parameters . we do not have that information ( expressions are evaluated with freemarker ) , so we keep reevaluating the parameter values until they stabilize .
