Logo Search packages:      
Sourcecode: gant version File versions

Object org::codehaus::gant::GantMetaClass::invokeMethod ( final Object  object,
final String  methodName,
final Object  arguments 
) [inline]

Invokes a method on the given object, with the given name and single argument.

See also:
invokeMethod(Object, String, Object[])
Parameters:
object The Object to invoke the method on
methodName The name of the method
arguments The argument to the method
Returns:
The return value of the method which is null if the return type is void

Definition at line 147 of file GantMetaClass.java.

References invokeMethod().

                                                                                                        {
    if ( arguments == null ) { return invokeMethod ( object , methodName , MetaClassHelper.EMPTY_ARRAY ) ; }
    else if ( arguments instanceof Tuple ) { return invokeMethod ( object , methodName , ( (Tuple) arguments ).toArray ( ) ) ; }
    else if ( arguments instanceof Object[] ) { return invokeMethod ( object , methodName , (Object[]) arguments ) ; }
    else { return invokeMethod ( object , methodName , new Object[] { arguments } ) ; }
  }


Generated by  Doxygen 1.6.0   Back to index