gov.llnl.babel.backend.jdk

Class ClientJNI


public class ClientJNI
extends java.lang.Object

Class ClientJNI writes the JNI C code that links the Java client 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

ClientJNI(LanguageWriterForC writer, Context context)
Create a ClientJNI object that will write symbol information to the provided output language writer stream.

Method Summary

void
generateCode(Extendable ext)
Write Java JNI information for the provided symbol to the language writer output stream provided in the class constructor.
static void
generateCode(Extendable symbol, LanguageWriterForC writer, Context context)
This is a convenience utility function that writes the JNI client information into the provided language writer output stream.

Constructor Details

ClientJNI

public ClientJNI(LanguageWriterForC writer,
                 Context context)
Create a ClientJNI object that will write symbol information to the provided output language writer stream.

Method Details

generateCode

public void generateCode(Extendable ext)
            throws CodeGenerationException
Write Java JNI information for the provided symbol to the language writer output stream provided in the class constructor. This method does not close the writer output stream. Code is currently generated only for sidl interfaces and classes, since enumerations and packages do not require JNI support.

generateCode

public static void generateCode(Extendable symbol,
                                LanguageWriterForC writer,
                                Context context)
            throws CodeGenerationException
This is a convenience utility function that writes the JNI client 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.