|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.jdk.Java
public class Java
Class Java
contains common Java language binding routines
shared by the Java backend code generators. This class simply collects
many common Java binding routines into one place.
Constructor Summary | |
---|---|
Java()
|
Method Summary | |
---|---|
static void |
declareIORVariable(LanguageWriterForC writer,
Argument arg,
java.lang.String prefix,
Context context)
Declare and initialize a variable with an IOR type. |
static void |
declareIORVariable(LanguageWriterForC writer,
Type type,
java.lang.String variable,
Context context)
Declare and initialize a variable with an IOR type. |
static void |
declareJavaVariable(LanguageWriterForC writer,
Type type,
java.lang.String variable)
Declare and initialize a variable with a Java type. |
static void |
declareJavaVariable(LanguageWriterForJava writer,
Type type,
java.lang.String variable)
Declare and initialize a variable with a Java type. |
static void |
declareServerInOutVariable(LanguageWriterForC writer,
Type type,
java.lang.String variable)
This is a quick modification of declareJavaVariable (above). |
static java.util.Set |
generateStubIncludes(LanguageWriterForC writer,
Extendable ext)
Generates include directives for all the Babel clases used in this fortran stub or skel |
static java.lang.String |
getClientJavaFile(SymbolID id)
Generate the Java filename for the client using the specified symbol identifier. |
static java.lang.String |
getClientJNIFile(SymbolID id)
Generate the JNI source filename for the client using the specified symbol identifier. |
static java.lang.String |
getDefaultJNIReturnValue(Method method)
Generate a string that will print a default return value (JNI) for given method |
static java.lang.String |
getDefaultReturnValue(Method method)
Generate a string that will print a default return value (Java) for given method |
static java.lang.String |
getDescriptor(java.lang.String type)
Convert a type string to a JNI descriptor. |
static java.lang.String |
getEnsureArray(Type arrayType)
Returns a string for the name of the ensure function to call for this array type. |
static java.lang.String |
getFullJavaSymbolName(SymbolID id)
Return the fully qualified Java name that corresponds to a sidl symbol type. |
static java.lang.String |
getHeaderFile(SymbolID id)
Generate the JNI source filename for the client using the specified symbol identifier. |
static java.lang.String |
getHolderName()
Return the name of the inner holder class used for inout and out method arguments. |
static java.lang.String |
getInterfaceWrapper()
Return the name of the inner wrapper class for interfaces. |
static java.lang.String |
getJavaArgument(Argument arg)
Return a string for the Java argument corresponding to the specified sidl argument. |
static java.lang.String |
getJavaBaseArray()
Return the string name of the Java base array that all automatically generated sidl arrays must extend. |
static java.lang.String |
getJavaBaseClass()
Return the string name of the Java base class that all automatically generated sidl classes must extend. |
static java.lang.String |
getJavaBaseInterface()
Return the string name of the Java base interface that all automatically generated sidl interfaces must extend. |
static java.lang.String |
getJavaFormalArgument(Argument arg)
Return a string for the Java argument corresponding to the specified sidl argument with a formal name. |
static java.lang.String |
getJavaImplSourceFile(SymbolID id)
Generate the Java filename for the server using the specified symbol identifier. |
static java.lang.String |
getJavaReturnType(Type type)
Return a string for the Java return type corresponding to the specified sidl type. |
static java.lang.String |
getJavaServerArgument(Argument arg)
|
static java.lang.String |
getJavaServerClassName(SymbolID id)
Return the name of the java server class. |
static java.lang.String |
getJavaServerMethodName(Method meth)
Return the name of Java Server Methods. |
static java.lang.String |
getJavaServerSignature(Method method)
Convert the method argument list and return type into a Java signature string according to JNI conventions. |
static java.lang.String |
getJavaSignature(Method method)
Convert the method argument list and return type into a Java signature string according to JNI conventions. |
static java.lang.String |
getJavaSymbolName(SymbolID id)
Return the shortened Java name of a sidl symbol type. |
static java.lang.String |
getJNIEnsureName(Argument arg)
Return the name of the given argument temporary variable for use in calls to ensure. |
static java.lang.String |
getJNIEnsureName(java.lang.String name)
Return the name of the given argument temporary variable for use in calls to ensure. |
static java.lang.String |
getJNIFormalArgument(Argument arg)
Return a string for the JNI argument corresponding to the specified sidl argument. |
static java.lang.String |
getJNIFunction(Method method)
Return the name of the JNI function corresponding to the specified sidl method. |
static java.lang.String |
getJNINativeType(java.lang.String type)
Return a string for the JNI native type corresponding to the specified Java type. |
static java.lang.String |
getJNIReturnType(Type type)
Return a string for the JNI native type corresponding to the specified Java return type. |
static java.lang.String |
getRegisterFunction(SymbolID id)
Return the name of the JNI registration function. |
static java.lang.String |
getServerJNIFile(SymbolID id)
Generate the JNI source filename for the server using the specified symbol identifier. |
static java.lang.String |
getSuperJNIFunction(Method method)
Return the name of the JNI function corresponding to the specified sidl method. |
static int |
localJavaVars(Method m)
Return an upper bound on the number of Java local object references required in the Java skeleton for the indicated method. |
static void |
postprocessJNIArgument(LanguageWriterForC writer,
Argument arg,
java.lang.String prefix,
Context context)
Method postprocessJNIArgument converts between IOR arguments
and Java arguments. |
static void |
postprocessJNIReturn(LanguageWriterForC writer,
Type type,
java.lang.String ior_result,
java.lang.String java_result)
Method postprocessJNIReturn converts between IOR return
arguments and Java return arguments. |
static void |
postprocessServerJNIArgument(LanguageWriterForC writer,
Argument arg,
java.lang.String prefix,
Context context)
Method postprocessServerJNIArgument converts Java arguments to
IOR arguments. |
static void |
postprocessServerJNIReturn(LanguageWriterForC writer,
Type type,
java.lang.String java_result,
java.lang.String ior_result,
Context context)
Method postprocessServerJNIReturn converts from java return
arguments to IOR return arguments. |
static void |
preprocessJNIArgument(LanguageWriterForC writer,
Argument arg,
java.lang.String prefix,
Context context)
Method preprocessJNIArgument converts between Java arguments
and IOR arguments. |
static void |
preprocessServerJNIArgument(LanguageWriterForC writer,
Argument arg,
java.lang.String prefix,
Context context)
Method preprocessServerJNIArgument converts IOR arguments to
Java arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Java()
Method Detail |
---|
public static java.lang.String getClientJavaFile(SymbolID id)
public static java.lang.String getClientJNIFile(SymbolID id)
public static java.lang.String getHeaderFile(SymbolID id)
public static java.lang.String getJavaImplSourceFile(SymbolID id)
public static java.lang.String getServerJNIFile(SymbolID id)
public static java.lang.String getJavaSymbolName(SymbolID id)
getFullJavaSymbolName
.
public static java.lang.String getFullJavaSymbolName(SymbolID id)
public static java.lang.String getJavaServerClassName(SymbolID id)
public static java.lang.String getJavaServerMethodName(Method meth)
public static java.lang.String getRegisterFunction(SymbolID id)
public static java.lang.String getJavaBaseClass()
public static java.lang.String getJavaBaseInterface()
public static java.lang.String getJavaBaseArray()
public static java.lang.String getInterfaceWrapper()
public static java.lang.String getHolderName()
public static java.lang.String getEnsureArray(Type arrayType)
public static java.lang.String getJavaReturnType(Type type)
public static java.lang.String getDescriptor(java.lang.String type)
public static java.lang.String getJavaArgument(Argument arg)
public static java.lang.String getJavaServerArgument(Argument arg)
public static java.lang.String getJavaFormalArgument(Argument arg)
public static java.lang.String getJavaSignature(Method method)
public static java.lang.String getJavaServerSignature(Method method)
public static java.lang.String getDefaultReturnValue(Method method)
method
- the method that needs a default return stringpublic static java.lang.String getDefaultJNIReturnValue(Method method)
method
- the method that needs a default return stringpublic static java.lang.String getJNIFunction(Method method)
public static java.lang.String getSuperJNIFunction(Method method)
public static java.lang.String getJNINativeType(java.lang.String type)
public static java.lang.String getJNIReturnType(Type type)
getJavaReturnType
and
converts the resulting strings into its JNI representation.
public static void declareIORVariable(LanguageWriterForC writer, Type type, java.lang.String variable, Context context) throws CodeGenerationException
CodeGenerationException
public static void declareIORVariable(LanguageWriterForC writer, Argument arg, java.lang.String prefix, Context context) throws CodeGenerationException
CodeGenerationException
public static void declareJavaVariable(LanguageWriterForC writer, Type type, java.lang.String variable)
public static void declareJavaVariable(LanguageWriterForJava writer, Type type, java.lang.String variable)
public static void declareServerInOutVariable(LanguageWriterForC writer, Type type, java.lang.String variable)
public static java.lang.String getJNIFormalArgument(Argument arg)
public static java.lang.String getJNIEnsureName(Argument arg)
public static java.lang.String getJNIEnsureName(java.lang.String name)
public static void preprocessJNIArgument(LanguageWriterForC writer, Argument arg, java.lang.String prefix, Context context) throws CodeGenerationException
preprocessJNIArgument
converts between Java arguments
and IOR arguments. Conversion routines are output to the language writer.
This routine retrieves the conversion string from the appropriate hash
table and then substitutes the appropriate variable names in the conversion
string.
CodeGenerationException
public static void postprocessJNIArgument(LanguageWriterForC writer, Argument arg, java.lang.String prefix, Context context) throws CodeGenerationException
postprocessJNIArgument
converts between IOR arguments
and Java arguments. Conversion routines are output to the language writer.
This routine retrieves the conversion string from the hash table and then
substitutes the appropriate variable names in the conversion string.
CodeGenerationException
public static void postprocessJNIReturn(LanguageWriterForC writer, Type type, java.lang.String ior_result, java.lang.String java_result)
postprocessJNIReturn
converts between IOR return
arguments and Java return arguments. Conversion routines are output
to the language writer. This routine retrieves the conversion string
from the hash table and then substitutes the appropriate variable names
in the conversion string.
public static void preprocessServerJNIArgument(LanguageWriterForC writer, Argument arg, java.lang.String prefix, Context context) throws CodeGenerationException
preprocessServerJNIArgument
converts IOR arguments to
Java arguments. Conversion routines are output to the language writer.
This routine retrieves the conversion string from the appropriate hash
table and then substitutes the appropriate variable names in the conversion
string.
CodeGenerationException
public static void postprocessServerJNIArgument(LanguageWriterForC writer, Argument arg, java.lang.String prefix, Context context) throws CodeGenerationException
postprocessServerJNIArgument
converts Java arguments to
IOR arguments. Conversion routines are output to the language writer.
This routine retrieves the conversion string from the hash table and then
substitutes the appropriate variable names in the conversion string.
CodeGenerationException
public static void postprocessServerJNIReturn(LanguageWriterForC writer, Type type, java.lang.String java_result, java.lang.String ior_result, Context context) throws CodeGenerationException
postprocessServerJNIReturn
converts from java return
arguments to IOR return arguments. Conversion routines are output
to the language writer. This routine retrieves the conversion string
from the hash table and then substitutes the appropriate variable names
in the conversion string.
CodeGenerationException
public static java.util.Set generateStubIncludes(LanguageWriterForC writer, Extendable ext) throws CodeGenerationException
writer
- Language writer for Cext
- Extendible (Class or Interface) to generate dependencies
CodeGenerationException
public static int localJavaVars(Method m)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |