net.vidageek.mirror.invoke
Class MethodHandlerByMethod

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

public final class MethodHandlerByMethod
extends Object
implements MethodHandler

This class is responsible for invoking a method using its instance.

Author:
jonasabreu

Constructor Summary
MethodHandlerByMethod(ReflectionProvider provider, Object target, Class<?> clazz, Method method)
           
 
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

MethodHandlerByMethod

public MethodHandlerByMethod(ReflectionProvider provider,
                             Object target,
                             Class<?> clazz,
                             Method method)
Method Detail

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.

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.


Copyright © 2011 VidaGeek.net. All Rights Reserved.