gov.llnl.babel
Class Generator

java.lang.Object
  extended by gov.llnl.babel.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, java.lang.Object data)
           
 void clear()
           
 void generateClient(java.lang.String lang)
           
 void generateServer(java.lang.String lang)
           
 void generateText(java.lang.String lang)
           
 boolean hasErrorOccurred()
           
static boolean isIncluded(SymbolID id, Context context)
           
static boolean notExcluded(SymbolID id, Context context)
           
 boolean parseFileAsInclude(java.lang.String sidl)
          Parse a file but don't include its contents in the list of symbols to be output.
 boolean parseOrResolve(java.lang.String url)
          Parse a file or a URL.
 void printErrors(java.io.PrintStream w)
           
 boolean resolveSymbols()
           
 void setTouchFile(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator(Context context)
Method Detail

parseOrResolve

public boolean parseOrResolve(java.lang.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.

parseFileAsInclude

public boolean parseFileAsInclude(java.lang.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).

resolveSymbols

public boolean resolveSymbols()

applyVisitor

public void applyVisitor(Visitor visitor,
                         java.lang.Object data)

generateText

public void generateText(java.lang.String lang)

generateClient

public void generateClient(java.lang.String lang)

generateServer

public void generateServer(java.lang.String lang)

hasErrorOccurred

public boolean hasErrorOccurred()

notExcluded

public static boolean notExcluded(SymbolID id,
                                  Context context)

isIncluded

public static boolean isIncluded(SymbolID id,
                                 Context context)

clear

public void clear()

printErrors

public void printErrors(java.io.PrintStream w)

setTouchFile

public void setTouchFile(java.io.File f)