Documentation menu

jdx signature

IDE equivalent: Parameter info

Show the signature of a member: one source-style line per overload with real parameter names, generics, throws and defaults, plus provenance. Takes a member reference (e.g. 'com.example.Point#getX()', "Gson#toJson(Object)"). An under-specified name lists every overload. Exits 1 when the member is unknown, 3 on a type or invalid reference, 4 when the workspace cannot be resolved.

Usage#

jdx signature [<options>] <ref>

Example#

jdx signature 'com.google.gson.Gson#fromJson' --limit 5 --coord com.google.code.gson:gson:2.14.0
signatures of com.google.gson.Gson#fromJson
  public <T> T fromJson(java.lang.String json, java.lang.Class<T> classOfT) throws com.google.gson.JsonSyntaxException
  public <T> T fromJson(java.lang.String json, java.lang.reflect.Type typeOfT) throws com.google.gson.JsonSyntaxException
  public <T> T fromJson(java.lang.String json, com.google.gson.reflect.TypeToken<T> typeOfT) throws com.google.gson.JsonSyntaxException
  public <T> T fromJson(java.io.Reader json, java.lang.Class<T> classOfT) throws com.google.gson.JsonSyntaxException, com.google.gson.JsonIOException
  public <T> T fromJson(java.io.Reader json, java.lang.reflect.Type typeOfT) throws com.google.gson.JsonIOException, com.google.gson.JsonSyntaxException
5 of 11 signatures shown (--limit 11 to see more)
warning MULTI_RELEASE_VARIANT: multi-release gson-2.14.0.jar serves version-specific variants for this JDK (21)
source: gson-2.14.0.jar (bytecode)
next: jdx show com.google.gson.Gson

Real output — this example ran against the current jdx when the page was built.

Options#

OptionDescription
--include-syntheticShow bridge/synthetic members, hidden by default.
--view=(kotlin|jvm)Declaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection: JVM names, hidden Continuation params, getters/setters, mangled internal names).
--limit=<int>Maximum signatures 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-jdkDo 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.
--fetchAllow 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.
--jsonEmit machine-readable JSON instead of human-readable text (same information, D-007).
--no-colorDisable ANSI colors even on a TTY (piped output is always plain).
--no-daemonForce in-process execution: do not forward this query to the background daemon even when its socket answers (PROPOSAL.md §14.1).
-h, --helpShow this message and exit

Arguments#

ArgumentDescription
<ref>Member reference to show the signature of (full or short form).

Full help text#

Show jdx signature --help
jdx signature --help
Usage: jdx signature [<options>] <ref>

  Show the signature of a member: one source-style line per overload with real parameter names, generics, throws and defaults, plus provenance. Takes a member reference (e.g. 'com.example.Point#getX()', "Gson#toJson(Object)"). An under-specified name lists every overload. Exits 1 when the member is unknown, 3 on a type or invalid reference, 4 when the workspace cannot be resolved.

Options:
  --include-synthetic     Show bridge/synthetic members, hidden by default.
  --view=(kotlin|jvm)     Declaration projection: kotlin (the default, true Kotlin declarations from @Metadata) or jvm (the raw JVM projection: JVM names, hidden Continuation params, getters/setters, mangled internal names).
  --limit=<int>           Maximum signatures 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>  Member reference to show the signature of (full or short form).

Real output — this example ran against the current jdx when the page was built.

Learn more#

Guide: Reading code · All commands

View as Markdown · Updated