public class CommandInfo extends Object
|Constructor and Description|
The Constructor for CommandInfo.
|Modifier and Type||Method and Description|
Return the command's class name.
Return the command verb.
Return the instantiated JavaBean component.
public String getCommandName()
public String getCommandClass()
public Object getCommandObject(DataHandler dh, ClassLoader loader) throws IOException, ClassNotFoundException
Begin by instantiating the component with
If the bean implements the
interface, call its
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.
dh- The DataHandler that describes the data to be passed to the command.
loader- The ClassLoader to be used to instantiate the bean.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.