de.bea.domingo.service
Class NotesJavaWriter

java.lang.Object
  extended by de.bea.domingo.service.NotesJavaWriter

public final class NotesJavaWriter
extends java.lang.Object

Creates Java source code of all Notes Java-API calls.

Author:
Kurt Riede

Field Summary
static java.lang.String JAVA_LOGFILE
          Name of property of java log file.
 
Method Summary
static NotesJavaWriter getInstance()
          Returns the singleton instance of this class.
(package private) static java.lang.String getType(java.lang.Object obj)
          Returns the type of an object as to be used e.g. in a cast operator.
 void logInvocation(java.lang.Object result, java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Throwable throwable)
          Logs an invocation to Java-like line.
 void logInvocation(java.lang.Object result, java.lang.Object object, java.lang.String method, java.lang.Object[] args, java.lang.Throwable throwable)
          Logs a method invocation as Java code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_LOGFILE

public static final java.lang.String JAVA_LOGFILE
Name of property of java log file.

See Also:
Constant Field Values
Method Detail

getInstance

public static NotesJavaWriter getInstance()
Returns the singleton instance of this class.

Returns:
singleton instance of this class

logInvocation

public void logInvocation(java.lang.Object result,
                          java.lang.Object object,
                          java.lang.reflect.Method method,
                          java.lang.Object[] args,
                          java.lang.Throwable throwable)
Logs an invocation to Java-like line.

Parameters:
result - the return value of the method call
object - the proxy instance that the method was invoked on
method - the Method instance corresponding to the interface method invoked on the proxy instance. The declaring class of the Method object will be the interface that the method was declared in, which may be a super-interface of the proxy interface that the proxy class inherits the method through.
args - an array of objects containing the values of the
throwable - an optional throwable that occurred during method call

arguments passed in the method invocation on the proxy instance, or null if interface method takes no arguments. Arguments of primitive types are wrapped in instances of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean.


logInvocation

public void logInvocation(java.lang.Object result,
                          java.lang.Object object,
                          java.lang.String method,
                          java.lang.Object[] args,
                          java.lang.Throwable throwable)
Logs a method invocation as Java code.

Parameters:
result - the return value of the method call
object - the proxy instance that the method was invoked on
method - the name of the method.
args - an array of objects containing the values of the arguments passed in the method invocation on the proxy instance, or null
throwable - an optional throwable that occurred during method call

if interface method takes no arguments. Arguments of primitive types are wrapped in instances of the appropriate primitive wrapper class, such as java.lang.Integer or java.lang.Boolean.


getType

static java.lang.String getType(java.lang.Object obj)
Returns the type of an object as to be used e.g. in a cast operator.

Parameters:
obj - the object
Returns:
type of the object


Domingo Java-API