Commands are implementations of org.,
with an optional org. class annotation to
insert additional documentation or override the default command name (which
is guessed from the class name).
Commands may be registered by adding them to a services file in the same JAR
(or classes directory) as the command implementation. The service file name
is META-INF/services/org.eclipse.jgit.pgm.TextBuiltin and it
contains one concrete implementation class name per line.
Command registration is identical to Java 6's services, however the catalog uses a lightweight wrapper to delay creating a command instance as much as possible. This avoids initializing the AWT or SWT GUI toolkits even if the command's constructor might require them.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private static final CommandCatalog | |
| private final ClassLoader |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CommandRef[] | |
| private Enumeration | |
| public static CommandRef[] | Returns: all common commands, sorted by command name.Get all common commands sorted by their name |
| public static CommandRef | |
| private void | |
| private void | |
| private static CommandRef[] |
| commands | back to summary |
|---|---|
| private final Map<String, CommandRef> commands | |
| INSTANCE | back to summary |
|---|---|
| private static final CommandCatalog INSTANCE | |
| ldr | back to summary |
|---|---|
| private final ClassLoader ldr | |
| CommandCatalog | back to summary |
|---|---|
| private CommandCatalog() | |
| all | back to summary |
|---|---|
| public static CommandRef[] all() Get all commands sorted by their name
| |
| catalogs | back to summary |
|---|---|
| private Enumeration | |
| common | back to summary |
|---|---|
| public static CommandRef[] common() Get all common commands sorted by their name
| |
| get | back to summary |
|---|---|
| public static CommandRef get(String name) Locate a single command by its user friendly name.
| |
| load | back to summary |
|---|---|
| private void load(String cn) | |
| scan | back to summary |
|---|---|
| private void scan(URL cUrl) | |
| toSortedArray | back to summary |
|---|---|
| private static CommandRef[] toSortedArray(Collection<CommandRef> c) | |