greflect
0.11-DRAFT

jp.sourceforge.greflect
Class Reflection.Invoker<T>

java.lang.Object
  extended by jp.sourceforge.greflect.Reflection.Invoker<T>
Enclosing class:
Reflection

public abstract class Reflection.Invoker<T>
extends java.lang.Object

[ungeneric]
Invoker invoke the method of the specified instance
Invokerは指定されたインスタンスのメソッドを呼び出します。 .

Type Variable T:
The type of invoke() return.
Responsibilities & Collaborations:
  1. Check the generic types of parameters with Param

    @lang ja @lang ja コンストラクタにパラメータを指定する。

  2. with
  3. with
  4. with
Notes & Descriptions:
See How To Invoke Method to know the basic use of this class.

@lang ja このクラスの基本的な使用方法を知るには How To Invoke Method を見てください。

SourceInfo:
$Id: Reflection.java 132 2008-07-02 13:51:18Z yo-zi $

Author:
yo-zi

Constructor Summary
Reflection.Invoker(Param<?> instance, java.lang.reflect.Method method, Param<?>... args)
          Prepares to execute the method by checking the number of parameters and the validity of the generic types
パラメタ数とジェネリックタイプの妥当性をチェックする ことによって、メソッドを実行する準備をします。 .
Reflection.Invoker(Param<?> instance, java.lang.String methodName, Param<?>... args)
          Prepares to execute the method by checking the number of parameters and the validity of the generic types
パラメタ数とジェネリックタイプの妥当性をチェックする ことによって、メソッドを実行する準備をします。 .
 
Method Summary
 T invoke()
          Invoke the method
メソッドを実行します。 .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reflection.Invoker

public Reflection.Invoker(Param<?> instance,
                          java.lang.String methodName,
                          Param<?>... args)
                   throws TypeViolationException,
                          java.lang.NoSuchMethodException,
                          java.lang.SecurityException,
                          java.lang.IllegalAccessException
Prepares to execute the method by checking the number of parameters and the validity of the generic types
パラメタ数とジェネリックタイプの妥当性をチェックする ことによって、メソッドを実行する準備をします。 .
Pre-conditions :
Each instance and args must be satisfy one of following conditions.
  1. An ungeneric instance of Param.
  2. The instance of UngenericParam of ungeneric object.
When both of above conditions are not satisfied. UnresolvedTypeVariableException will be thrown.

@lang ja instanceおよびargsは以下のいずれかである必要があります。

  1. Paramのアンジェネリックインスタンスである
  2. アンジェネリックをオブジェクトを指定したUngenericParam インスタンスである
もしいずれでもないなら、UnresolvedTypeVariableExceptionが スローされます。
Post-conditions :
The target method is executable.

@lang ja 対象のメソッドは実行可能である。

Parameters:
instance - instance to invoke the method.
@lang ja メソッドを実行するインスタンス。
methodName - method name to invoke.
@lang ja 実行するメソッドの名前。
args - The parametes of the method.
@lang ja 実行するメソッドのパラメータ。
Throws:
TypeViolationException
java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException

Reflection.Invoker

public Reflection.Invoker(Param<?> instance,
                          java.lang.reflect.Method method,
                          Param<?>... args)
                   throws TypeViolationException,
                          java.lang.IllegalArgumentException,
                          java.lang.IllegalAccessException
Prepares to execute the method by checking the number of parameters and the validity of the generic types
パラメタ数とジェネリックタイプの妥当性をチェックする ことによって、メソッドを実行する準備をします。 .
Pre-conditions :
Each instance and args must be satisfy one of following conditions.
  1. An ungeneric instance of Param.
  2. The instance of UngenericParam of ungeneric object.
When both of above conditions are not satisfied. UnresolvedTypeVariableException will be thrown.

@lang ja instanceおよびargsは以下のいずれかである必要があります。

  1. Paramのアンジェネリックインスタンスである
  2. アンジェネリックをオブジェクトを指定したUngenericParam インスタンスである
もしいずれでもないなら、UnresolvedTypeVariableExceptionが スローされます。
Post-conditions :
The target method is executable.

@lang ja 対象のメソッドは実行可能である。

Parameters:
instance - instance to invoke the method.
@lang ja メソッドを実行するインスタンス。
method - method to invoke.
@lang ja 実行するメソッド。
args - The parametes of the method.
@lang ja 実行するメソッドのパラメータ。
Throws:
TypeViolationException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException - When the class declaring the static method is specified with type parameters.
staticメソッドを宣言したクラスが型パラメータとともに指定されたとき。
Method Detail

invoke

public T invoke()
         throws java.lang.reflect.InvocationTargetException
Invoke the method
メソッドを実行します。 .
Pre-conditions :
Post-conditions :

Returns:
Throws:
java.lang.reflect.InvocationTargetException

greflect
0.11-DRAFT

Copyright © 2008 yo-zi. All Rights Reserved.