FileDocCategorySizeDatePackage
InvokeHelper.javaAPI DocGlassfish v2 API3298Fri May 04 22:25:00 BST 2007com.sun.cli.jmx.util

InvokeHelper

public class InvokeHelper extends Object

Fields Summary
final Object
mTarget
Constructors Summary
public InvokeHelper(Object target)

		mTarget	= target;
	
Methods Summary
public static java.lang.Class[]StringsToClasses(java.lang.String[] signature)

		final int	count	= Array.getLength( signature );
		
		Class []	classes	 = new Class [ count ];
		
		for( int i = 0; i < count; ++i )
		{
			classes[ i ]	= ClassUtil.getClassFromName( signature[ i ] );
		}
		
		return( classes );
	
public java.lang.Objectinvoke(java.lang.String name, java.lang.Object[] params, java.lang.String[] signature)

    	Object	result	= null;
    	
    	final Class []	signatureClasses	= StringsToClasses( signature );
    	
    	final Method	method	= mTarget.getClass().getDeclaredMethod( name, signatureClasses );
    	
    	result	= method.invoke( mTarget, params );
    	
    	return( result );