net.vidageek.mirror.invoke
Class MethodHandlerByName

java.lang.Object
  extended by net.vidageek.mirror.invoke.MethodHandlerByName
All Implemented Interfaces:
MethodHandler

public final class MethodHandlerByName
extends Object
implements MethodHandler

Class responsible for invoking methods using is name and arguments.

Author:
jonasabreu

Constructor Summary
MethodHandlerByName(ReflectionProvider provider, Object target, Class<?> clazz, String methodName)
           
 
Method Summary
 Object withArgs(Object... args)
          Invoke a method using arguments args.
 Object withoutArgs()
          Invoke a method without arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodHandlerByName

public MethodHandlerByName(ReflectionProvider provider,
                           Object target,
                           Class<?> clazz,
                           String methodName)
Method Detail

withoutArgs

public Object withoutArgs()
Description copied from interface: MethodHandler
Invoke a method without arguments.

Specified by:
withoutArgs in interface MethodHandler
Returns:
The value returned by the method or null if the method was void.

withArgs

public Object withArgs(Object... args)
Description copied from interface: MethodHandler
Invoke a method using arguments args.

Specified by:
withArgs in interface MethodHandler
Parameters:
args - arguments to be used to invoke method.
Returns:
The value returned by the method or null if the method was void.


Copyright © 2011 VidaGeek.net. All Rights Reserved.