jdx callers
IDE equivalent: Call hierarchy (in)
Show who calls a method, transitively to --depth (default 1): one indented row per calling method, cycle-safe with …(cycle) markers. --in/--exclude filter rows by artifact label (jar file, JDK module or class-dir name). Member refs only (methods + constructors); type refs and field refs exit 3 (fields belong to jdx usages). Exits 1 when the method is unknown or uncalled, 2 on an ambiguous short name.
Usage#
jdx callers [<options>] <ref>Example#
jdx callers 'com.google.gson.Gson#getAdapter(java.lang.Class)' --coord com.google.code.gson:gson:2.14.0
callers of 'com.google.gson.Gson#getAdapter(java.lang.Class)'
call com.google.gson.internal.bind.JavaTimeTypeAdapters#localDateTime(com.google.gson.Gson) gson-2.14.0.jar
call com.google.gson.internal.bind.JavaTimeTypeAdapters#offsetDateTime(com.google.gson.Gson) gson-2.14.0.jar
call com.google.gson.internal.bind.JavaTimeTypeAdapters#offsetTime(com.google.gson.Gson) gson-2.14.0.jar
call com.google.gson.internal.bind.JavaTimeTypeAdapters#zonedDateTime(com.google.gson.Gson) gson-2.14.0.jar
call com.google.gson.internal.bind.ObjectTypeAdapter#write(com.google.gson.stream.JsonWriter, java.lang.Object) gson-2.14.0.jar
call com.google.gson.internal.sql.SqlTimestampTypeAdapter$1#create(com.google.gson.Gson, com.google.gson.reflect.TypeToken) gson-2.14.0.jar
warning MULTI_RELEASE_VARIANT: multi-release gson-2.14.0.jar serves version-specific variants for this JDK (21)Real output — this example ran against the current jdx when the page was built.
Options#
| Option | Description |
|---|---|
--depth=<int> | Maximum transitive levels shown (default 1, direct callers only). |
--in=<text> | Only callers whose artifact label matches this glob (jar file name, JDK module or class-dir name). |
--exclude=<text> | Skip callers whose artifact label matches this glob. |
--limit=<int> | Maximum tree nodes shown (default 50); the rest become a truncation footer. |
--jars=<text> | Binary roots: jar files, class directories or globs (repeatable). Merge in front of the selected workspace's roots. |
-w, --workspace=<text> | Use a named workspace (see jdx ws). Explicit --jars merge in front of it. |
--no-jdk | Do not include the running JDK's stdlib (included by default). |
--coord=<text> | Maven coordinate root group:artifact:version (repeatable). Resolved from ~/.gradle/caches and ~/.m2 first; with --fetch, downloaded from Maven repositories into <cache-dir>/m2 with checksum verification. Merges in front of the workspace. |
--repo=<text> | Maven repository base URL for --coord fetches (repeatable, e.g. --repo https://repo.example.com/maven2). Tried in flag order before Maven Central, which stays last as the fallback. Must be an http(s) URL. |
--fetch | Allow downloading --coord artifacts (and their -sources.jar) from Maven repositories (Central by default, --repo to add mirrors). Without it, coordinates resolve from the local caches only. |
--json | Emit machine-readable JSON instead of human-readable text (same information, D-007). |
--no-color | Disable ANSI colors even on a TTY (piped output is always plain). |
--no-daemon | Force in-process execution: do not forward this query to the background daemon even when its socket answers (PROPOSAL.md §14.1). |
-h, --help | Show this message and exit |
Arguments#
| Argument | Description |
|---|---|
<ref> | Method or constructor reference to list callers of (full or short form). |
Full help text#
Show jdx callers --help
jdx callers --help
Usage: jdx callers [<options>] <ref>
Show who calls a method, transitively to --depth (default 1): one indented row per calling method, cycle-safe with …(cycle) markers. --in/--exclude filter rows by artifact label (jar file, JDK module or class-dir name). Member refs only (methods + constructors); type refs and field refs exit 3 (fields belong to jdx usages). Exits 1 when the method is unknown or uncalled, 2 on an ambiguous short name.
Options:
--depth=<int> Maximum transitive levels shown (default 1, direct callers only).
--in=<text> Only callers whose artifact label matches this glob (jar file name, JDK module or class-dir name).
--exclude=<text> Skip callers whose artifact label matches this glob.
--limit=<int> Maximum tree nodes shown (default 50); the rest become a truncation footer.
--jars=<text> Binary roots: jar files, class directories or globs (repeatable). Merge in front of the selected workspace's roots.
-w, --workspace=<text> Use a named workspace (see jdx ws). Explicit --jars merge in front of it.
--no-jdk Do not include the running JDK's stdlib (included by default).
--coord=<text> Maven coordinate root group:artifact:version (repeatable). Resolved from ~/.gradle/caches and ~/.m2 first; with --fetch, downloaded from Maven repositories into <cache-dir>/m2 with checksum verification. Merges in front of the workspace.
--repo=<text> Maven repository base URL for --coord fetches (repeatable, e.g. --repo https://repo.example.com/maven2). Tried in flag order before Maven Central, which stays last as the fallback. Must be an http(s) URL.
--fetch Allow downloading --coord artifacts (and their -sources.jar) from Maven repositories (Central by default, --repo to add mirrors). Without it, coordinates resolve from the local caches only.
--json Emit machine-readable JSON instead of human-readable text (same information, D-007).
--no-color Disable ANSI colors even on a TTY (piped output is always plain).
--no-daemon Force in-process execution: do not forward this query to the background daemon even when its socket answers (PROPOSAL.md §14.1).
-h, --help Show this message and exit
Arguments:
<ref> Method or constructor reference to list callers of (full or short form).Real output — this example ran against the current jdx when the page was built.
Learn more#
Guide: Usages, hierarchy & calls · All commands