gov.llnl.babel

Class Generator


public class Generator
extends java.lang.Object

This is a simple object that manages the parsing and generation of files.

Constructor Summary

Generator(Context context)

Method Summary

void
applyVisitor(Visitor visitor, Object data)
void
clear()
void
generateClient(String lang)
void
generateServer(String lang)
void
generateText(String lang)
boolean
hasErrorOccurred()
static boolean
isIncluded(SymbolID id, Context context)
static boolean
notExcluded(SymbolID id, Context context)
boolean
parseFileAsInclude(String sidl)
Parse a file but don't include its contents in the list of symbols to be output.
boolean
parseOrResolve(String url)
Parse a file or a URL.
void
printErrors(PrintStream w)
boolean
resolveSymbols()
void
setTouchFile(File f)

Constructor Details

Generator

public Generator(Context context)

Method Details

applyVisitor

public void applyVisitor(Visitor visitor,
                         Object data)

clear

public void clear()

generateClient

public void generateClient(String lang)

generateServer

public void generateServer(String lang)

generateText

public void generateText(String lang)

hasErrorOccurred

public boolean hasErrorOccurred()

isIncluded

public static boolean isIncluded(SymbolID id,
                                 Context context)

notExcluded

public static boolean notExcluded(SymbolID id,
                                  Context context)

parseFileAsInclude

public boolean parseFileAsInclude(String sidl)
Parse a file but don't include its contents in the list of symbols to be output.
Parameters:
sidl - must be a filename or a proper URL (not a symbol name).

parseOrResolve

public boolean parseOrResolve(String url)
Parse a file or a URL. If it's not a file, try resolving it as a SIDL type from the XML respository.
Parameters:
url - can be a filename, a proper URL, or a SIDL type name.

printErrors

public void printErrors(PrintStream w)

resolveSymbols

public boolean resolveSymbols()

setTouchFile

public void setTouchFile(File f)