functiongetDefinitionAt
Information
Returns the definition of the name at a position in a file as JSON, e.g. for go to
definition in an editor. The names in the innermost class the position is in are looked
up like in getDefUseChains, and the positions of the names are found in the
file on disk.
The JSON has the file, line and column, the
definition (as in getDefUseChains, without its uses) or
null if there's no name at the position or it can't be looked up, the
use of the name at the position or null if it's the declared
name of the definition, and the candidates in the classes a replaceable
class is redeclared as. The uses of the definition are returned by
getDefUseChains with its name.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | A file of a loaded class. | |
| Integer | line | ||
| Integer | column | Starting at 1, counting bytes. | |
| Boolean | prettyPrint | false |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | definition |