_debug("declaring dependency for rate variable " + name
+ " in port " + port.getFullName());
}
Variable variable = DFUtilities.getRateVariable(port, name);
DependencyDeclaration declaration = (DependencyDeclaration) variable
.getAttribute("_SDFRateDependencyDeclaration",
DependencyDeclaration.class);
if (declaration == null) {
try {
declaration = new DependencyDeclaration(variable,
"_SDFRateDependencyDeclaration");
} catch (NameDuplicationException ex) {
// We used to ignore this, but FindBugs would complain
// that declaration could still be null.
throw new InternalErrorException("Failed to construct "
+ "_SDFRateDependencyDeclaration");
}
}
declaration.setDependents(dependents);
analysis.addDependencyDeclaration(declaration);
}