net.sf.jagg
Class SelfMethodCall

java.lang.Object
  extended by net.sf.jagg.MethodCall
      extended by net.sf.jagg.SelfMethodCall

public class SelfMethodCall
extends MethodCall

A SelfMethodCall is a MethodCall that simply returns its own object, instead of invoking a Method on that object.

Since:
0.5.0
Author:
Randy Gettman

Constructor Summary
SelfMethodCall(java.lang.Object prototype)
          Constructs a SelfMethodCall around an object.
 
Method Summary
 java.lang.Class<?> getReturnType()
          Returns the return type of the MethodCall, which is in this case the type of the object prototype.
 java.lang.Object invoke(java.lang.Object object)
          Returns the object itself without invoking any Methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelfMethodCall

public SelfMethodCall(java.lang.Object prototype)
Constructs a SelfMethodCall around an object.

Parameters:
prototype - A prototype object.
Method Detail

getReturnType

public java.lang.Class<?> getReturnType()
Returns the return type of the MethodCall, which is in this case the type of the object prototype.

Overrides:
getReturnType in class MethodCall
Returns:
A Class object representing the return type of the method, which is in this case the type of the object prototype.

invoke

public java.lang.Object invoke(java.lang.Object object)
Returns the object itself without invoking any Methods.

Overrides:
invoke in class MethodCall
Parameters:
object - The object on which to "invoke" the Method.
Returns:
The object itself.


Copyright © 2010-2013 jAgg Team. All Rights Reserved.