|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.llnl.babel.backend.c.ImplHeader
public class ImplHeader
Class ImplHeader generates a C implementation header to a
language writer output stream. The constructor takes a language writer
stream and method generateCode generates the implementation
header file for the specified symbol to the output stream. The language
writer stream is not closed by this object.
| Constructor Summary | |
|---|---|
ImplHeader(LanguageWriterForC writer,
CodeSplicer splicer,
Context context)
Create a ImplHeader object that will write symbol
information to the provided output language writer stream. |
|
| Method Summary | |
|---|---|
void |
generateCode(Class cls)
Write C implementation header information for the provided class to the language writer output stream provided in the constructor. |
static void |
generateCode(Class cls,
LanguageWriterForC writer,
CodeSplicer splicer,
Context context)
This is a convenience utility function that writes the symbol header information into the provided language writer output stream. |
java.util.Collection |
getLocalReferences(Extendable ext)
|
static void |
writeBuiltinDecls(LanguageWriterForC lw,
Class cls,
Context context)
Write external declarations for the Class constructor and
destructor. |
static void |
writeMethodDecls(LanguageWriterForC lw,
Class cls,
boolean isStatic,
Context context)
Write external declarations for all non- abstract methods
in the class. |
static void |
writeMethodSignature(LanguageWriterForC lw,
Method meth,
java.lang.String self,
boolean addExtern,
boolean isIfc,
boolean addType,
SymbolID id,
Context context)
Write the method signature with arguments indented one level. |
static void |
writeRMIAccessDecls(LanguageWriterForC lw,
Class cls,
boolean isStatic)
Write external declarations for the RMI fconnects methods in the class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImplHeader(LanguageWriterForC writer,
CodeSplicer splicer,
Context context)
ImplHeader object that will write symbol
information to the provided output language writer stream.
Assumption: This code is completed generated so no code splicer
capabilities are needed.
writer - the output writer for the new implementation header
file. This writer will not be closed by this method.| Method Detail |
|---|
public static void generateCode(Class cls,
LanguageWriterForC writer,
CodeSplicer splicer,
Context context)
throws CodeGenerationException
cls - the Class whose implementation header file
is to be created.writer - the output writer with which the new header file is
created.
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
public static void writeMethodSignature(LanguageWriterForC lw,
Method meth,
java.lang.String self,
boolean addExtern,
boolean isIfc,
boolean addType,
SymbolID id,
Context context)
throws CodeGenerationException
lw - the target language writermeth - the methodself - the self variable, if appropriateaddExtern - TRUE if the signature is to include the "extern"
modifier (as in the header file case).isIfc - TRUE if the method belongs to an interfaceid - the name of the symbol owning the method
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
public static void writeMethodDecls(LanguageWriterForC lw,
Class cls,
boolean isStatic,
Context context)
throws CodeGenerationException
abstract methods
in the class.
lw - the language writer to write to.cls - the Class whose header will be written.isStatic - true means write only static methods;
false means write only non-static
methods.
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
public static void writeRMIAccessDecls(LanguageWriterForC lw,
Class cls,
boolean isStatic)
throws CodeGenerationException
lw - the language writer to write to.cls - the Class whose header will be written.isStatic - true means write only static methods;
false means write only non-static
methods.
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
public static void writeBuiltinDecls(LanguageWriterForC lw,
Class cls,
Context context)
throws CodeGenerationException
Class constructor and
destructor.
lw - the language writer to write to.cls - the Class whose header will be written.
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
public java.util.Collection getLocalReferences(Extendable ext)
throws CodeGenerationException
CodeGenerationException
public void generateCode(Class cls)
throws CodeGenerationException
cls - the Class whose header will be written.
CodeGenerationException - this is a catch all exception. It can be caused by I/O trouble or
violations of the data type invariants.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||