# jdx members

IDE equivalent: Code completion after `.`

List the members of a type — the '.' completion equivalent. Inherited members are included by default (--inherited), grouped by declaring type; pass --declared for only the type's own members. java.lang.Object members collapse to one line unless --from java.lang.Object expands them. Exits 1 when the type is unknown, 2 when a short name is ambiguous.

## Usage

```text
jdx members [<options>] <ref>
```

## Example

```console
$ jdx members com.google.gson.JsonArray --declared --limit 12 --coord com.google.code.gson:gson:2.14.0
members of com.google.gson.JsonArray
constructors declared on com.google.gson.JsonArray:
  constructor public JsonArray()
  constructor public JsonArray(int capacity)
methods declared on com.google.gson.JsonArray:
  method public boolean contains(com.google.gson.JsonElement element)
  method public boolean equals(java.lang.Object o)
  method public boolean getAsBoolean()
  method public boolean isEmpty()
  method public boolean remove(com.google.gson.JsonElement element)
  method public byte getAsByte()
  method public char getAsCharacter()
  method public com.google.gson.JsonArray deepCopy()
  method public com.google.gson.JsonElement get(int i)
  method public com.google.gson.JsonElement remove(int index)
12 of 32 members shown (--limit 32 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)
```

## Options

| Option | Description |
|---|---|
| `--declared` | Only members declared on this exact type (overrides the --inherited default). |
| `--inherited` | Include inherited members (the default; accepted for explicitness). |
| `--kind=(all\|method\|field\|ctor\|property)` | Member kind to list: method, field, ctor, property or all. |
| `--access=(public\|protected\|package\|private\|all)` | Visibility to list: public, protected, package, private or all (default: public + protected). |
| `--static` | Only static members (mutually exclusive with --instance). |
| `--instance` | Only instance members (mutually exclusive with --static). |
| `--from=<text>` | Only members inherited from a specific supertype (e.g. --from java.lang.Object). |
| `--grep=<text>` | Only members whose name matches this regex. |
| `--include-synthetic` | Include bridge/synthetic members, hidden by default. |
| `--limit=<int>` | Maximum member rows shown (default 50); the rest become a truncation footer. |
| `--with-doc` | Include the first javadoc sentence per member. |
| `--brief` | Minimal text output: bare member rows with no group headers and no provenance block (warnings and footers stay). Mutually exclusive with --with-doc. Text only; --json is unaffected. |
| `--max-lines=<int>` | Maximum text lines shown; the rest become a continuation footer. Text only; --json is unaffected. |
| `--sort=(kind\|name\|declaring)` | Row order: kind (the default, kind-then-name in linearisation order); name (flat name-first across kinds and groups); declaring (alphabetical by declaring type). |
| `--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). |
| `--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>` | Type reference to list members of. |

## Full help text

```console
$ jdx members --help
Usage: jdx members [<options>] <ref>

  List the members of a type — the '.' completion equivalent. Inherited members are included by default (--inherited), grouped by declaring type; pass --declared for only the type's own members. java.lang.Object members collapse to one line unless --from java.lang.Object expands them. Exits 1 when the type is unknown, 2 when a short name is ambiguous.

Options:
  --declared                                       Only members declared on this exact type (overrides the --inherited default).
  --inherited                                      Include inherited members (the default; accepted for explicitness).
  --kind=(all|method|field|ctor|property)          Member kind to list: method, field, ctor, property or all.
  --access=(public|protected|package|private|all)  Visibility to list: public, protected, package, private or all (default: public + protected).
  --static                                         Only static members (mutually exclusive with --instance).
  --instance                                       Only instance members (mutually exclusive with --static).
  --from=<text>                                    Only members inherited from a specific supertype (e.g. --from java.lang.Object).
  --grep=<text>                                    Only members whose name matches this regex.
  --include-synthetic                              Include bridge/synthetic members, hidden by default.
  --limit=<int>                                    Maximum member rows shown (default 50); the rest become a truncation footer.
  --with-doc                                       Include the first javadoc sentence per member.
  --brief                                          Minimal text output: bare member rows with no group headers and no provenance block (warnings and footers stay). Mutually exclusive with --with-doc. Text only; --json is unaffected.
  --max-lines=<int>                                Maximum text lines shown; the rest become a continuation footer. Text only; --json is unaffected.
  --sort=(kind|name|declaring)                     Row order: kind (the default, kind-then-name in linearisation order); name (flat name-first across kinds and groups); declaring (alphabetical by declaring type).
  --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).
  --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>  Type reference to list members of.
```

## Learn more

Guide: [Reading code](https://mohammadmd1383.github.io/jdx/docs/reading-code/) · [All commands](https://mohammadmd1383.github.io/jdx/docs/reference/)
