JavaTM 2 Platform
Standard Ed. 6

类 java.lang.NoSuchMethodException
的使用

使用 NoSuchMethodException 的软件包
java.lang 提供利用 Java 编程语言进行程序设计的基础类。 
javax.management.relation 提供 Relation Service 的定义。 
javax.script 脚本 API 由定义 Java TM Scripting Engines 的接口和类组成,并为它们在 Java 应用程序中的使用提供框架。 
 

java.langNoSuchMethodException 的使用
 

抛出 NoSuchMethodExceptionjava.lang 中的方法
 Constructor<T> Class.getConstructor(Class<?>... parameterTypes)
          返回一个 Constructor 对象,它反映此 Class 对象所表示的类的指定公共构造方法。
 Constructor<T> Class.getDeclaredConstructor(Class<?>... parameterTypes)
          返回一个 Constructor 对象,该对象反映此 Class 对象所表示的类或接口的指定构造方法。
 Method Class.getDeclaredMethod(String name, Class<?>... parameterTypes)
          返回一个 Method 对象,该对象反映此 Class 对象所表示的类或接口的指定已声明方法。
 Method Class.getMethod(String name, Class<?>... parameterTypes)
          返回一个 Method 对象,它反映此 Class 对象所表示的类或接口的指定公共成员方法。
 

javax.management.relationNoSuchMethodException 的使用
 

抛出 NoSuchMethodExceptionjavax.management.relation 中的方法
 void RelationService.addRelation(ObjectName relationObjectName)
          作为 Relation Service 中的关系添加由用户创建(且由其在 MBean Server 中注册)的 MBean。
 void RelationServiceMBean.addRelation(ObjectName relationObjectName)
          作为 Relation Service 中的关系添加由用户创建(且由其在 MBean Server 中注册)的 MBean。
 

javax.scriptNoSuchMethodException 的使用
 

抛出 NoSuchMethodExceptionjavax.script 中的方法
 Object Invocable.invokeFunction(String name, Object... args)
          用于调用脚本中定义的顶层程序和函数。
 Object Invocable.invokeMethod(Object thiz, String name, Object... args)
          对以前的脚本执行中已经编译的脚本对象(以 ScriptEngine 的状态保持)调用某一方法。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only