functiongetDependencyGraph
Information
Returns the classes in scope and the classes they use as JSON,
to find out which classes a change of a library affects. The names are looked up like
in getDefUseChains.
The JSON has an object classes with a member for each class, named by its
full name, with its kind, restriction, source span, hash
and uses. The hash is computed from the source of the class without the classes
declared in it, comments and whitespace, so it only changes when the class itself changes.
uses are the full names of the classes it uses, sorted, including the classes
that declare the components, constants and enumeration literals it uses and the candidates
of names looked up through replaceable classes. A class is affected by a change if it or
a class it uses, directly or not, has another hash or other uses.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | scope | $Code(AllLoadedClasses) | The classes to include. |
| String | fileName | "" | The file to write the JSON to, if not empty. |
| Boolean | prettyPrint | false |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | graph | The JSON, or the file name if it was written to a file. |