gov.llnl.babel.backend.jdk
Class ServerJNI

java.lang.Object
  extended bygov.llnl.babel.backend.jdk.ServerJNI

public class ServerJNI
extends java.lang.Object

Class ServerJNI writes the JNI C code that links the Java server to the IOR. The constructor takes a C language writer stream and method generateCode writes the C JNI code for the specified symbol to the output stream. The language writer output stream is not closed by this object.


Constructor Summary
ServerJNI(Extendable ext)
          Create a ServerJNI object that will write symbol information to a created language writer stream.
ServerJNI(Extendable ext, LanguageWriterForC writer)
          Create a ServerJNI object that will write symbol information to the provided output language writer stream.
 
Method Summary
 void generateCode()
          Write Java JNI information for the provided symbol to the language writer output stream provided in the class constructor.
static void generateCode(Extendable symbol)
          This is a convenience utility function that writes the JNI server information into the provided language writer output stream.
static void generateCode(Extendable symbol, LanguageWriterForC writer)
          This is a convenience utility function that writes the JNI server information into the provided language writer output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerJNI

public ServerJNI(Extendable ext,
                 LanguageWriterForC writer)
          throws CodeGenerationException
Create a ServerJNI object that will write symbol information to the provided output language writer stream.

Parameters:
ext - an interface or class symbol that needs source file for a Java extension class.
writer - the output writer stream

ServerJNI

public ServerJNI(Extendable ext)
          throws CodeGenerationException
Create a ServerJNI object that will write symbol information to a created language writer stream.

Parameters:
ext - an interface or class symbol that needs source file for a Java extension class.
Method Detail

generateCode

public static void generateCode(Extendable symbol,
                                LanguageWriterForC writer)
                         throws CodeGenerationException
This is a convenience utility function that writes the JNI server information into the provided language writer output stream. The output stream is not closed on exit. A code generation exception is thrown if an error is detected, such as I/O trouble or a violation

Parameters:
symbol - an interface or class symbol that needs source file for a Java extension class.
writer - the output writer stream* of data type invariants.
Throws:
CodeGenerationException

generateCode

public static void generateCode(Extendable symbol)
                         throws CodeGenerationException
This is a convenience utility function that writes the JNI server information into the provided language writer output stream. The output stream is not closed on exit. A code generation exception is thrown if an error is detected, such as I/O trouble or a violation of data type invariants.

Throws:
CodeGenerationException

generateCode

public void generateCode()
                  throws CodeGenerationException
Write Java JNI information for the provided symbol to the language writer output stream provided in the class constructor.

Throws:
CodeGenerationException