|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.sidl.SidlSource
public class SidlSource
This class provides the ability to write SIDL source file for a SIDL class/interface.
Constructor Summary | |
---|---|
SidlSource(LanguageWriterForSidl writer,
Context context)
Generate an instance to write the SIDL file. |
Method Summary | |
---|---|
void |
generateCode(Class cls)
Generate the SIDL for the class. |
void |
generateCode(Enumeration enm)
Generate the SIDL for the enumeration. |
void |
generateCode(Interface iface)
Generate the SIDL for the interface. |
void |
generateCode(Package pkg)
Generate the SIDL for a package. |
void |
generateCode(Struct st)
Generate the SIDL for a struct. |
static void |
generateCode(Symbol sym,
LanguageWriterForSidl writer,
Context context)
Generate the SIDL file only for a package. |
static boolean |
isBaseClassName(java.lang.String name)
Return indication of whether or not the symbol name is the same as the base class. |
static boolean |
isBaseInterfaceName(java.lang.String name)
/** Return indication of whether or not the symbol name is the same as the base interface. |
void |
printAssertion(LanguageWriter lw,
Assertion as)
Print the assertion. |
void |
printMethods(Extendable ext)
Print the methods associated with the extendable (i.e., class or interface). |
void |
printParentInterfaces(Extendable ext)
Print the parent interfaces for the extendable (i.e., class or interface). |
void |
printRequires(Package pkg)
Prints the requires statements based on symbols associated with the specified package. |
void |
printSignaturePlus(LanguageWriter lw,
Extendable ext,
Method meth,
java.lang.String parent_pkg)
Print the signature of the method, optionally including the definition modifier, and any associated pre- and post-conditions to the specified LanguageWriter . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SidlSource(LanguageWriterForSidl writer, Context context)
writer
- the output device to which the SIDL should be written.Method Detail |
---|
public void generateCode(Struct st)
enm
- the SIDL struct to be written.
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public void generateCode(Enumeration enm) throws CodeGenerationException
enm
- the SIDL enumeration to be written.
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public static boolean isBaseClassName(java.lang.String name)
name
- the symbol name being checked
public static boolean isBaseInterfaceName(java.lang.String name)
name
- the symbol name being checked
public void printParentInterfaces(Extendable ext) throws CodeGenerationException
ext
- the SIDL extendable whose parent interfaces are to be written
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public void printAssertion(LanguageWriter lw, Assertion as)
lw
- the language writer to which the signature is printedpublic void printSignaturePlus(LanguageWriter lw, Extendable ext, Method meth, java.lang.String parent_pkg)
LanguageWriter
. Also, optionally abbreviate the type if
in specified package.
lw
- the language writer to which the signature is printedext
- The Extendable this method is being generated formeth
- the method whose signature is being printedparent_pkg
- the string containing the parent package. When not
null, it is used to strip the package from the return
string if it is in the specified package.public void printMethods(Extendable ext) throws CodeGenerationException
ext
- the SIDL extendable whose methods are to be written
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public void generateCode(Class cls) throws CodeGenerationException
cls
- the SIDL class to be written.
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public void generateCode(Interface iface) throws CodeGenerationException
iface
- the SIDL interface to be written.
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public void printRequires(Package pkg)
pkg
- the package whose imports/requires list is being outputpublic void generateCode(Package pkg) throws CodeGenerationException
pkg
- the SIDL package whose file is to be written.
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.public static void generateCode(Symbol sym, LanguageWriterForSidl writer, Context context) throws CodeGenerationException
CodeGenerationException
- a catch all exception to indicate problems in the code generation
phase.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |