com.caucho.java.gen
Class BaseMethod

java.lang.Object
  extended by com.caucho.java.gen.ClassComponent
      extended by com.caucho.java.gen.BaseMethod

public class BaseMethod
extends ClassComponent

Basic method generation.


Constructor Summary
BaseMethod(java.lang.reflect.Method method)
          Creates the base method
BaseMethod(java.lang.reflect.Method method, CallChain call)
          Creates the base method
BaseMethod(java.lang.reflect.Method apiMethod, java.lang.reflect.Method implMethod)
          Creates the base method
BaseMethod(java.lang.String methodName, CallChain call)
          Creates the base method
 
Method Summary
 void generate(JavaWriter out)
          Generates the code for the class.
protected  void generateCall(JavaWriter out, java.lang.String[] args)
          Generates the code for the call.
 java.lang.String[] generateMethodHeader(JavaWriter out)
          Generates the method header
 CallChain getCall()
          Returns the call.
 java.lang.Class[] getExceptionTypes()
          Returns the exception types.
 java.lang.reflect.Method getMethod()
          Returns the method.
 java.lang.String getMethodName()
          Returns the method name.
 java.lang.Class[] getParameterTypes()
          Returns the parameter types.
 java.lang.Class getReturnType()
          Gets the return type.
 void setCall(CallChain call)
          Sets the call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseMethod

public BaseMethod(java.lang.String methodName,
                  CallChain call)
Creates the base method


BaseMethod

public BaseMethod(java.lang.reflect.Method method,
                  CallChain call)
Creates the base method


BaseMethod

public BaseMethod(java.lang.reflect.Method method)
Creates the base method


BaseMethod

public BaseMethod(java.lang.reflect.Method apiMethod,
                  java.lang.reflect.Method implMethod)
Creates the base method

Method Detail

getCall

public CallChain getCall()
Returns the call.


setCall

public void setCall(CallChain call)
Sets the call.


getMethod

public java.lang.reflect.Method getMethod()
Returns the method.


getMethodName

public java.lang.String getMethodName()
Returns the method name.


getParameterTypes

public java.lang.Class[] getParameterTypes()
Returns the parameter types.


getReturnType

public java.lang.Class getReturnType()
Gets the return type.


getExceptionTypes

public java.lang.Class[] getExceptionTypes()
Returns the exception types.


generate

public void generate(JavaWriter out)
              throws java.io.IOException
Generates the code for the class.

Overrides:
generate in class ClassComponent
Parameters:
out - the writer to the output stream.
Throws:
java.io.IOException

generateMethodHeader

public java.lang.String[] generateMethodHeader(JavaWriter out)
                                        throws java.io.IOException
Generates the method header

Parameters:
out - the writer to the output stream.
Returns:
the method arguments
Throws:
java.io.IOException

generateCall

protected void generateCall(JavaWriter out,
                            java.lang.String[] args)
                     throws java.io.IOException
Generates the code for the call.

Parameters:
out - the writer to the output stream.
args - the arguments
Throws:
java.io.IOException