| Modifier and Type | Class and Description |
|---|---|
| private static class | CommandInfo.Beans
Helper class to invoke Beans.instantiate reflectively or the equivalent with core reflection when module java.desktop is not readable. |
| Access | Constructor and Description |
|---|---|
| public | CommandInfo(String
The command verb this CommandInfo decribes. verb, String The command's fully qualified class name. className)The Constructor for CommandInfo. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public Object | Returns: The beanThe DataHandler that describes the data to be
passed to the command. dh, ClassLoader The ClassLoader to be used to instantiate the bean. loader)Return the instantiated JavaBean component. |
| className | back to summary |
|---|---|
| private String className | |
| verb | back to summary |
|---|---|
| private String verb | |
| CommandInfo | back to summary |
|---|---|
| public CommandInfo(String verb, String className) The Constructor for CommandInfo. | |
| getCommandClass | back to summary |
|---|---|
| public String getCommandClass() Return the command's class name. This method MAY return null in cases where a CommandMap subclassed CommandInfo for its own purposes. In other words, it might not be possible to create the correct state in the command by merely knowing its class name. DO NOT DEPEND ON THIS METHOD RETURNING A VALID VALUE!
| |
| getCommandName | back to summary |
|---|---|
| public String getCommandName() Return the command verb.
| |
| getCommandObject | back to summary |
|---|---|
| public Object getCommandObject(DataHandler dh, ClassLoader loader) throws IOException, ClassNotFoundException Return the instantiated JavaBean component.
If the current runtime environment supports
The component class needs to be public. On Java SE 9 and newer, if the component class is in a named module, it needs to be in an exported package.
If the bean implements the If the DataHandler parameter is null, then the bean is instantiated with no data. Note this may be useful if for some reason the DataHandler that is passed in throws IOExceptions when this method attempts to access its InputStream. It will allow the caller to retrieve a reference to the bean if it can be instantiated. If the bean does NOT implement the CommandObject interface, this method will check if it implements the java.io.Externalizable interface. If it does, the bean's readExternal method will be called if an InputStream can be acquired from the DataHandler.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Method |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Object | instantiate(ClassLoader loader, String cn)
Equivalent to invoking java.beans.Beans.instantiate(loader, cn) |
| instantiateMethod | back to summary |
|---|---|
| pack-priv static final Method instantiateMethod | |
| Beans | back to summary |
|---|---|
| private Beans() | |
| instantiate | back to summary |
|---|---|
| pack-priv static Object instantiate(ClassLoader loader, String cn) throws IOException, ClassNotFoundException Equivalent to invoking java.beans.Beans.instantiate(loader, cn) | |