com.caucho.ejb.gen
Class View

java.lang.Object
  extended by com.caucho.ejb.gen.View
Direct Known Subclasses:
MessageView, PojoView, StatefulView, StatelessView

public abstract class View
extends java.lang.Object

Represents a public interface to a bean, e.g. a local stateful view


Field Summary
protected  ApiClass _api
           
protected  BeanGenerator _bean
           
 
Constructor Summary
protected View(BeanGenerator bean, ApiClass api)
           
 
Method Summary
abstract  void generate(JavaWriter out)
          Generates the view code.
 void generateBusinessConstructor(JavaWriter out)
          Generates constructor addiontions
 void generateBusinessConstructor(JavaWriter out, java.util.HashMap map)
          Generates constructor addiontions
 void generateBusinessMethods(JavaWriter out)
          Generates view's business methods
 void generateBusinessPrologue(JavaWriter out)
          Generates prologue additions
 void generateBusinessPrologue(JavaWriter out, java.util.HashMap map)
          Generates prologue additions
 void generateContextHomeConstructor(JavaWriter out)
          Generates context home's constructor
 void generateContextObjectConstructor(JavaWriter out)
          Generates context object's constructor
 void generateContextPrologue(JavaWriter out)
          Generates prologue for the context.
 void generateDestroy(JavaWriter out)
          Generates any global destroy
 void generateTimer(JavaWriter out)
          Generates timer code
protected  ApiClass getApi()
          Returns the API class.
 java.lang.reflect.Method getAroundInvokeMethod()
          Returns any around-invoke method
protected  BeanGenerator getBean()
          Returns the owning bean.
protected  java.lang.String getBeanClassName()
           
protected  ApiClass getEjbClass()
          Returns the bean's ejbclass
static java.lang.String getFullMethodName(ApiMethod method)
          Returns a full method name with arguments.
static java.lang.String getFullMethodName(java.lang.reflect.Method method)
          Returns a full method name with arguments.
static java.lang.String getFullMethodName(java.lang.String methodName, java.lang.Class[] params)
          Returns a full method name with arguments.
 java.util.ArrayList<? extends BusinessMethodGenerator> getMethods()
          Returns the introspected methods
protected  java.lang.String getViewClassName()
           
 void introspect()
          Introspects the view
 boolean isRemote()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_bean

protected final BeanGenerator _bean

_api

protected final ApiClass _api
Constructor Detail

View

protected View(BeanGenerator bean,
               ApiClass api)
Method Detail

getBean

protected BeanGenerator getBean()
Returns the owning bean.


getEjbClass

protected ApiClass getEjbClass()
Returns the bean's ejbclass


getViewClassName

protected java.lang.String getViewClassName()

getBeanClassName

protected java.lang.String getBeanClassName()

isRemote

public boolean isRemote()

getApi

protected ApiClass getApi()
Returns the API class.


introspect

public void introspect()
Introspects the view


getMethods

public java.util.ArrayList<? extends BusinessMethodGenerator> getMethods()
Returns the introspected methods


getAroundInvokeMethod

public java.lang.reflect.Method getAroundInvokeMethod()
Returns any around-invoke method


generateContextPrologue

public void generateContextPrologue(JavaWriter out)
                             throws java.io.IOException
Generates prologue for the context.

Throws:
java.io.IOException

generateContextHomeConstructor

public void generateContextHomeConstructor(JavaWriter out)
                                    throws java.io.IOException
Generates context home's constructor

Throws:
java.io.IOException

generateContextObjectConstructor

public void generateContextObjectConstructor(JavaWriter out)
                                      throws java.io.IOException
Generates context object's constructor

Throws:
java.io.IOException

generateTimer

public void generateTimer(JavaWriter out)
                   throws java.io.IOException
Generates timer code

Throws:
java.io.IOException

generateDestroy

public void generateDestroy(JavaWriter out)
                     throws java.io.IOException
Generates any global destroy

Throws:
java.io.IOException

generate

public abstract void generate(JavaWriter out)
                       throws java.io.IOException
Generates the view code.

Throws:
java.io.IOException

generateBusinessConstructor

public void generateBusinessConstructor(JavaWriter out)
                                 throws java.io.IOException
Generates constructor addiontions

Throws:
java.io.IOException

generateBusinessConstructor

public void generateBusinessConstructor(JavaWriter out,
                                        java.util.HashMap map)
                                 throws java.io.IOException
Generates constructor addiontions

Throws:
java.io.IOException

generateBusinessPrologue

public void generateBusinessPrologue(JavaWriter out)
                              throws java.io.IOException
Generates prologue additions

Throws:
java.io.IOException

generateBusinessPrologue

public void generateBusinessPrologue(JavaWriter out,
                                     java.util.HashMap map)
                              throws java.io.IOException
Generates prologue additions

Throws:
java.io.IOException

generateBusinessMethods

public void generateBusinessMethods(JavaWriter out)
                             throws java.io.IOException
Generates view's business methods

Throws:
java.io.IOException

getFullMethodName

public static java.lang.String getFullMethodName(ApiMethod method)
Returns a full method name with arguments.


getFullMethodName

public static java.lang.String getFullMethodName(java.lang.reflect.Method method)
Returns a full method name with arguments.


getFullMethodName

public static java.lang.String getFullMethodName(java.lang.String methodName,
                                                 java.lang.Class[] params)
Returns a full method name with arguments.