public class CommandInfo extends Object
Constructor and Description |
---|
CommandInfo(String verb, String className)
对于commandinfo构造函数。
|
Modifier and Type | Method and Description |
---|---|
String |
getCommandClass()
返回命令的类名称。
|
String |
getCommandName()
返回命令动词。
|
Object |
getCommandObject(DataHandler dh, ClassLoader loader)
返回实例化JavaBean组件。
|
public String getCommandName()
public String getCommandClass()
public Object getCommandObject(DataHandler dh, ClassLoader loader) throws IOException, ClassNotFoundException
开始通过实例化组件的Beans.instantiate()
。
如果bean实现了javax.activation.CommandObject
接口,调用它的setCommandContext
方法。
如果javax.activation.Datahandler参数为空,那么bean实例化没有数据。注:这可能是有用的如果由于某种原因,在抛ioexceptions javax.activation.Datahandler时这种方法试图访问它的输入流过去了。这将允许调用者是否可以实例化检索参考豆。
如果bean没有实现commandobject接口,这种方法会检查它是否实现了java.io.externalizable接口。如果是这样,豆的readexternal方法将如果InputStream可以从javax.activation.Datahandler获得称。
dh
- javax.activation.Datahandler描述数据被传递到命令。
loader
-类加载器用来实例化bean。
IOException
ClassNotFoundException
Beans.instantiate(java.lang.ClassLoader, java.lang.String)
,
CommandObject
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, 2014, Oracle and/or its affiliates. All rights reserved.