JavaTM Platform
Standard Ed. 6

クラス
java.lang.reflect.Method の使用

Method を使用しているパッケージ
java.beans Beans (JavaBeansTM アーキテクチャーに基づいたコンポーネント) の開発に関連するクラスが含まれています。 
java.lang Java プログラム言語の設計にあたり基本的なクラスを提供します。 
java.lang.annotation Java プログラミング言語の注釈機能をサポートするライブラリを提供します。 
java.lang.reflect クラスとオブジェクトに関するリフレクト情報を取得するクラスおよびインタフェースを提供します。 
java.rmi.server サーバー側の RMI をサポートするクラスとインタフェースを提供します。 
javax.management Java Management Extensions のコアクラスを提供します。 
javax.management.modelmbean ModelMBean クラスの定義を提供します。 
javax.management.openmbean 公開データ型と Open MBean 記述子クラスを提供します。 
 

java.beans での Method の使用
 

Method を返す java.beans のメソッド
 Method EventSetDescriptor.getAddListenerMethod()
          イベントリスナーの追加時に使用するメソッドを取得します。
 Method EventSetDescriptor.getGetListenerMethod()
          登録済みイベントリスナーへのアクセスに使用するメソッドを取得します。
 Method IndexedPropertyDescriptor.getIndexedReadMethod()
          インデックス付きプロパティー値の読み込みに使用するメソッドを取得します。
 Method IndexedPropertyDescriptor.getIndexedWriteMethod()
          インデックス付きプロパティー値の書き込みに使用するメソッドを取得します。
 Method[] EventSetDescriptor.getListenerMethods()
          ターゲットリスナーインタフェースのメソッドを取得します。
 Method MethodDescriptor.getMethod()
          この MethodDescriptor がカプセル化するメソッドを取得します。
 Method PropertyDescriptor.getReadMethod()
          プロパティー値の読み込みに使用するメソッドを取得します。
 Method EventSetDescriptor.getRemoveListenerMethod()
          イベントリスナーの削除時に使用するメソッドを取得します。
 Method PropertyDescriptor.getWriteMethod()
          プロパティー値の書き込みに使用するメソッドを取得します。
 

Method 型のパラメータを持つ java.beans のメソッド
 Object EventHandler.invoke(Object proxy, Method method, Object[] arguments)
          イベントから適切なプロパティー値を抽出し、この EventHandler に関連付けられているアクションに渡します。
 void IndexedPropertyDescriptor.setIndexedReadMethod(Method readMethod)
          インデックス付きプロパティー値の読み込みに使用するメソッドを設定します。
 void IndexedPropertyDescriptor.setIndexedWriteMethod(Method writeMethod)
          インデックス付きプロパティー値の書き込みに使用するメソッドを設定します。
 void PropertyDescriptor.setReadMethod(Method readMethod)
          プロパティー値の読み込みに使用するメソッドを設定します。
 void PropertyDescriptor.setWriteMethod(Method writeMethod)
          プロパティー値の書き込みに使用するメソッドを設定します。
 

Method 型のパラメータを持つ java.beans のコンストラクタ
EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
          java.lang.reflect.Method オブジェクトと java.lang.Class オブジェクトを使って、ゼロから EventSetDescriptor を作成します。
EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
          java.lang.reflect.Method オブジェクトと java.lang.Class オブジェクトを使って、ゼロから EventSetDescriptor を作成します。
EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod, Method getListenerMethod)
          このコンストラクタは、java.lang.reflect.Method オブジェクトと java.lang.Class オブジェクトを使って、ゼロから EventSetDescriptor を作成します。
EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod, Method getListenerMethod)
          このコンストラクタは、java.lang.reflect.Method オブジェクトと java.lang.Class オブジェクトを使って、ゼロから EventSetDescriptor を作成します。
EventSetDescriptor(String eventSetName, Class<?> listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
          java.lang.reflect.MethodDescriptor オブジェクトと java.lang.Class オブジェクトを使って、ゼロから EventSetDescriptor を作成します。
IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod, Method indexedReadMethod, Method indexedWriteMethod)
          このコンストラクタは、単純なプロパティー名と、プロパティーの読み込みおよび書き込み用の Method オブジェクトを引数に取ります。
MethodDescriptor(Method method)
          Method から MethodDescriptor を構築します。
MethodDescriptor(Method method, ParameterDescriptor[] parameterDescriptors)
          Method から MethodDescriptor を構築し、メソッドの各パラメータについて説明的な情報を提供します。
PropertyDescriptor(String propertyName, Method readMethod, Method writeMethod)
          このコンストラクタは、単純なプロパティー名と、プロパティーの読み込みおよび書き込み用の Method オブジェクトを引数に取ります。
 

java.lang での Method の使用
 

Method を返す java.lang のメソッド
 Method Class.getDeclaredMethod(String name, Class<?>... parameterTypes)
          この Class オブジェクトが表すクラスまたはインタフェースの指定された宣言メソッドをリフレクトする Method オブジェクトを返します。
 Method[] Class.getDeclaredMethods()
          この Class オブジェクトが表すクラスまたはインタフェースによって宣言されたすべてのメソッドをリフレクトする Method オブジェクトの配列を返します。
 Method Class.getEnclosingMethod()
          この Class オブジェクトが、メソッド内のローカルクラスまたは匿名クラスを表す場合は、基本となるクラスを直接囲むメソッドを表す Method オブジェクトを返します。
 Method Class.getMethod(String name, Class<?>... parameterTypes)
          この Class オブジェクトが表すクラスまたはインタフェースの指定された public メンバーメソッドをリフレクトする Method オブジェクトを返します。
 Method[] Class.getMethods()
          この Class オブジェクトが表すクラスまたはインタフェースのすべての public 「メンバー」メソッドをリフレクトする Method オブジェクトを格納している配列を返します。
 

java.lang.annotation での Method の使用
 

Method を返す java.lang.annotation のメソッド
 Method AnnotationTypeMismatchException.element()
          不正な型の要素に対応する Method オブジェクトを返します。
 

Method 型のパラメータを持つ java.lang.annotation のコンストラクタ
AnnotationTypeMismatchException(Method element, String foundType)
          指定された注釈型要素と見つかったデータ型について AnnotationTypeMismatchException を構築します。
 

java.lang.reflect での Method の使用
 

Method 型のパラメータを持つ java.lang.reflect のメソッド
 Object InvocationHandler.invoke(Object proxy, Method method, Object[] args)
          プロキシインスタンスでメソッド呼び出しを処理し、その結果を返します。
 

java.rmi.server での Method の使用
 

Method 型のパラメータを持つ java.rmi.server のメソッド
 Object RemoteObjectInvocationHandler.invoke(Object proxy, Method method, Object[] args)
          このオブジェクトをカプセル化しているプロキシインスタンス proxy 上で発行されたメソッド呼び出しを処理し、その結果を返します。
 Object RemoteRef.invoke(Remote obj, Method method, Object[] params, long opnum)
          メソッドを呼び出します。
 

javax.management での Method の使用
 

Method 型のパラメータを持つ javax.management のメソッド
 Object MBeanServerInvocationHandler.invoke(Object proxy, Method method, Object[] args)
           
 

Method 型のパラメータを持つ javax.management のコンストラクタ
MBeanAttributeInfo(String name, String description, Method getter, Method setter)
          このコンストラクタは、単純な属性名と、属性の読み込みおよび書き込み用の Method オブジェクトを引数に取ります。
MBeanOperationInfo(String description, Method method)
          MBeanOperationInfo オブジェクトを構築します。
 

javax.management.modelmbean での Method の使用
 

Method 型のパラメータを持つ javax.management.modelmbean のコンストラクタ
ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter)
          デフォルトの記述子で ModelMBeanAttributeInfo オブジェクトを構築します。
ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter, Descriptor descriptor)
          ModelMBeanAttributeInfo オブジェクトを構築します。
ModelMBeanOperationInfo(String description, Method operationMethod)
          デフォルトの記述子で ModelMBeanOperationInfo オブジェクトを構築します。
ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor)
          ModelMBeanOperationInfo オブジェクトを構築します。
 

javax.management.openmbean での Method の使用
 

Method 型のパラメータを持つ javax.management.openmbean のメソッド
 Object CompositeDataInvocationHandler.invoke(Object proxy, Method method, Object[] args)
           
 


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。