gov.llnl.babel
Class BabelConfiguration

java.lang.Object
  extended by gov.llnl.babel.BabelConfiguration
All Implemented Interfaces:
java.lang.Cloneable

public class BabelConfiguration
extends java.lang.Object
implements java.lang.Cloneable

This class provides access to configuration information (including user options) required by the parsers and backend. This class originally envisaged as a singleton. However, it makes sense to have several of them when trying to do several runs in a single command line.


Field Summary
static java.lang.String CONTRACT_ENFORCER
           
static java.lang.String CONTRACT_POLICY
           
static java.lang.String FUND_EXCEPTION
           
static java.lang.String INV_EXCEPTION
           
static java.lang.String OPTIONAL_RMI
           
static java.lang.String POST_EXCEPTION
           
static java.lang.String PRE_EXCEPTION
           
static int sidl_bool_array
          These are the values returned by calling the _type function query on an array.
static int sidl_char_array
           
static int sidl_dcomplex_array
           
static int sidl_double_array
           
static int sidl_fcomplex_array
           
static int sidl_float_array
           
static int sidl_int_array
           
static int sidl_interface_array
           
static int sidl_long_array
           
static int sidl_opaque_array
           
static int sidl_string_array
           
 
Constructor Summary
BabelConfiguration()
          Since this is a singleton class, its constructor is protected.
 
Method Summary
 void addExcluded(RegexMatch rm)
          Add another regular expression to the list of excluded regular expressions.
 void addIncluded(java.lang.String str)
          Add another regular expression to the list of included regular expressions.
 void addToRepositoryPath(java.lang.String new_path)
          Adds a new entry to the repository path.
static java.lang.String arrayType(int type)
           
 java.lang.Object clone()
          Make a copy of the configuration.
 boolean excludeExternal()
          Return the value of the exclude external symbol code generation user option.
 boolean generateClient()
          Return the value of the client generation user option.
 boolean generateContracts()
          Return whether or not contract enforcement code should be generated.
 boolean generateHooks()
          Return the value of the pre/post method hooks generation user option.
 boolean generateServer()
          Return the value of the server generation user option.
 boolean generateStdlib()
          Return the value of the SIDL stdlib generation user option.
 boolean generateText()
          Return the value of the text generation user option.
static java.lang.String getArrayOrderName(int i)
           
static java.lang.String getBaseClass()
          Return the full name of the root of the class type hierarchy.
static java.lang.String getBaseExceptionClass()
          Return the full name of the base exception class.
static java.lang.String getBaseExceptionInterface()
          The full name of the base of the exception type hierarchy.
static java.lang.String getBaseExceptionType()
          The full name of the fundamental exception type.
static java.lang.String getBaseInterface()
          Return the full name of the root of the SIDL type hierarchy.
 boolean getCCAMode()
           
static java.lang.String getClassInfo()
          Return the full name of the ClassInfo interface.
static java.lang.String getClassInfoI()
          Return the full name of the class implementing ClassInfo interface.
 boolean getCommentLocalOnly()
          Return the value of the comment local methods only option.
 java.util.List getExcludedList()
          Return the list of RegexMatch objects that should be excluded from code generation.
static java.lang.String getFundamentalException()
          The full name of the most basic exception type.
 boolean getGenMakefile()
          Should a Makefile be generated.
 boolean getHasBindC()
           
 java.util.List getIncludedList()
          Return the list of RegexMatch objects that should be included from code generation.
static java.lang.String getInvariantViolation()
          The full name of the Invariant Violation type implicit in all methods of classes with invariants.
static java.lang.String getLangSpecific()
           
 java.lang.String getMakefileName()
          The full name of the file associated with generated makefile fragments.
 java.lang.String getMakePrefix()
          Return the make prefix option.
static int getMaximumArray()
          Return the maximum array dimension.
static java.lang.String getMemoryAllocationException()
           
 boolean getMultiMode()
           
static java.lang.String getNotImplemented()
           
static java.lang.String getOptionalRmiMacro()
          Return the full name of the base exception class.
 java.lang.String getOutputDirectory()
          Return the value of the output directory user option.
static java.lang.String getPostconditionViolation()
          The full name of the Postcondition Violation type implicit in all methods with postconditions.
static java.lang.String getPreconditionViolation()
          The full name of the Precondition Violation type implicit in all methods with preconditions.
 boolean getProtectLastTimeModified()
           
 boolean getRenameSplicers()
           
 java.lang.String getRepositoryPath()
          Return the value of the repository path.
static java.lang.String getRMITicket()
           
static java.lang.String getRuntimeException()
          The full name of the exception type implicit in all methods.
static java.lang.String getSerializableType()
           
 boolean getShortFileNames()
          Return the value of the short file names option.
 boolean getSuppressIOR()
           
 boolean getSuppressStub()
           
 java.lang.String getTargetLanguage()
           
 java.lang.String getVPathDirectory()
          Return the value of the vpath directory user option.
static boolean isSIDLBaseClass(SymbolID id)
          Return whether the specified symbol belongs to the SIDL namespace.
 boolean isVerbose()
          Return the value of the parser check user option.
 boolean makeCxxCheckNullIOR()
          Return the value of the make package subdirs user option.
 boolean makeGlueSubdirs()
          Return the value of the package and glue subdirs user option.
 boolean makeLanguageSubdir()
          Return the value of the language subdirectory user option.
 boolean makePackageSubdirs()
          Return the value of the make package subdirs user option.
 boolean parseCheckOnly()
          Return the value of the parser check user option.
 void removeFromRepositoryPath(java.lang.String path)
           
 void setCCAMode(boolean value)
          Set the rename splicers flag to true or false.
 void setCommentLocalOnly(boolean localOnly)
          Set the value of the comment local methods only option.
 void setCxxCheckNullIOR(boolean checkNullIOR)
          Set the value of the Cxx NullIORException checking option.
 void setExcludeExternal(boolean val)
          Set the value of the exclude external symbol code generation user option.
 void setGenerateClient(boolean generate)
          Set the value of the client generation user option.
 void setGenerateHooks(boolean generate)
          Set the value of the pre/post method hooks generation user option.
 void setGenerateServer(boolean generate)
          Set the value of the server generation user option.
 void setGenerateStdlib(boolean generate)
          Set the value of the SIDL stdlib generation user option.
 void setGenerateText(boolean generate)
          Set the value of the text generation user option.
 void setHasBindC(boolean bindc)
          Set if this Fortran compiler supports the iso_c_binding module
 void setMakeGlueSubdirs(boolean make_glue_subdirs)
          Set the value of the package and glue subdirs user option.
 void setMakeLanguageSubdir(boolean make_language_subdir)
          Specify whether files for each language should be generated in a separate subdirectory.
 void setMakePackageSubdirs(boolean make_subdirs)
          Set the value of the make package subdirs user option.
 void setMakePrefix(java.lang.String prefix)
          Set the make prefix and makefile name options.
 void setMultiMode(boolean multi_mode)
           
 void setOutputDirectory(java.lang.String dir)
          Set the value of the output directory user option.
 void setParseCheckOnly(boolean parse)
          Set the value of the parser check user option.
 void setProtectLastTimeModified(boolean value)
           
 void setRenameSplicers(boolean value)
          Set the rename splicers flag to true or false.
 void setShortFileNames(boolean shortFileNames)
          Set the value of the short file names option.
 void setSuppressContracts(boolean suppress)
          Set contract suppression to true or false.
 void setSuppressIOR(boolean value)
          Set the IOR suppression to true or false.
 void setSuppressStub(boolean value)
          Set the stub suppression to true or false.
 void setSuppressTimestamps(boolean suppress)
          Set the value of the timestamp suppression user option.
 void setTargetLanguage(java.lang.String lang)
          Set the value of the target language user option.
 void setVerbose(boolean verbose)
          Set the value of the parser check user option.
 void setVPathDirectory(java.lang.String dir)
          Set the value of the vpath directory user option.
 boolean suppressTimestamps()
          Return the value of the timestamp suppression user option.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUND_EXCEPTION

public static final java.lang.String FUND_EXCEPTION
See Also:
Constant Field Values

PRE_EXCEPTION

public static final java.lang.String PRE_EXCEPTION
See Also:
Constant Field Values

POST_EXCEPTION

public static final java.lang.String POST_EXCEPTION
See Also:
Constant Field Values

INV_EXCEPTION

public static final java.lang.String INV_EXCEPTION
See Also:
Constant Field Values

CONTRACT_ENFORCER

public static final java.lang.String CONTRACT_ENFORCER
See Also:
Constant Field Values

CONTRACT_POLICY

public static final java.lang.String CONTRACT_POLICY
See Also:
Constant Field Values

OPTIONAL_RMI

public static final java.lang.String OPTIONAL_RMI
See Also:
Constant Field Values

sidl_bool_array

public static final int sidl_bool_array
These are the values returned by calling the _type function query on an array. THESE MUST BE THE SAME AS FOUND IN runtime/sidl/sidlArray.h (They are also used in F77 and F90)

See Also:
Constant Field Values

sidl_char_array

public static final int sidl_char_array
See Also:
Constant Field Values

sidl_dcomplex_array

public static final int sidl_dcomplex_array
See Also:
Constant Field Values

sidl_double_array

public static final int sidl_double_array
See Also:
Constant Field Values

sidl_fcomplex_array

public static final int sidl_fcomplex_array
See Also:
Constant Field Values

sidl_float_array

public static final int sidl_float_array
See Also:
Constant Field Values

sidl_int_array

public static final int sidl_int_array
See Also:
Constant Field Values

sidl_long_array

public static final int sidl_long_array
See Also:
Constant Field Values

sidl_opaque_array

public static final int sidl_opaque_array
See Also:
Constant Field Values

sidl_string_array

public static final int sidl_string_array
See Also:
Constant Field Values

sidl_interface_array

public static final int sidl_interface_array
See Also:
Constant Field Values
Constructor Detail

BabelConfiguration

public BabelConfiguration()
Since this is a singleton class, its constructor is protected.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Make a copy of the configuration.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

arrayType

public static java.lang.String arrayType(int type)

getBaseInterface

public static java.lang.String getBaseInterface()
Return the full name of the root of the SIDL type hierarchy.


getBaseClass

public static java.lang.String getBaseClass()
Return the full name of the root of the class type hierarchy. This is the one class that does not have a parent class.


getClassInfo

public static java.lang.String getClassInfo()
Return the full name of the ClassInfo interface.


getClassInfoI

public static java.lang.String getClassInfoI()
Return the full name of the class implementing ClassInfo interface.


getBaseExceptionInterface

public static java.lang.String getBaseExceptionInterface()
The full name of the base of the exception type hierarchy. All exceptions must extend this type.


getBaseExceptionClass

public static java.lang.String getBaseExceptionClass()
Return the full name of the base exception class.


getOptionalRmiMacro

public static java.lang.String getOptionalRmiMacro()
Return the full name of the base exception class.


getFundamentalException

public static java.lang.String getFundamentalException()
The full name of the most basic exception type.


getRuntimeException

public static java.lang.String getRuntimeException()
The full name of the exception type implicit in all methods.


getInvariantViolation

public static java.lang.String getInvariantViolation()
The full name of the Invariant Violation type implicit in all methods of classes with invariants.


getPreconditionViolation

public static java.lang.String getPreconditionViolation()
The full name of the Precondition Violation type implicit in all methods with preconditions.


getPostconditionViolation

public static java.lang.String getPostconditionViolation()
The full name of the Postcondition Violation type implicit in all methods with postconditions.


getLangSpecific

public static java.lang.String getLangSpecific()

getNotImplemented

public static java.lang.String getNotImplemented()

getMemoryAllocationException

public static java.lang.String getMemoryAllocationException()

getBaseExceptionType

public static java.lang.String getBaseExceptionType()
The full name of the fundamental exception type.


getRMITicket

public static java.lang.String getRMITicket()

getSerializableType

public static java.lang.String getSerializableType()

getMakefileName

public java.lang.String getMakefileName()
The full name of the file associated with generated makefile fragments.


getGenMakefile

public boolean getGenMakefile()
Should a Makefile be generated.


getMaximumArray

public static int getMaximumArray()
Return the maximum array dimension.


setMultiMode

public void setMultiMode(boolean multi_mode)

getMultiMode

public boolean getMultiMode()

isSIDLBaseClass

public static boolean isSIDLBaseClass(SymbolID id)
Return whether the specified symbol belongs to the SIDL namespace.


setSuppressIOR

public void setSuppressIOR(boolean value)
Set the IOR suppression to true or false.


getSuppressIOR

public boolean getSuppressIOR()

setSuppressStub

public void setSuppressStub(boolean value)
Set the stub suppression to true or false.


getSuppressStub

public boolean getSuppressStub()

setRenameSplicers

public void setRenameSplicers(boolean value)
Set the rename splicers flag to true or false.


getRenameSplicers

public boolean getRenameSplicers()

setCCAMode

public void setCCAMode(boolean value)
Set the rename splicers flag to true or false.


getProtectLastTimeModified

public boolean getProtectLastTimeModified()

setProtectLastTimeModified

public void setProtectLastTimeModified(boolean value)

getCCAMode

public boolean getCCAMode()

setSuppressContracts

public void setSuppressContracts(boolean suppress)
Set contract suppression to true or false.


generateContracts

public boolean generateContracts()
Return whether or not contract enforcement code should be generated.


getArrayOrderName

public static java.lang.String getArrayOrderName(int i)

setGenerateClient

public void setGenerateClient(boolean generate)
Set the value of the client generation user option.


generateClient

public boolean generateClient()
Return the value of the client generation user option.


setGenerateHooks

public void setGenerateHooks(boolean generate)
Set the value of the pre/post method hooks generation user option.


generateHooks

public boolean generateHooks()
Return the value of the pre/post method hooks generation user option.


setGenerateServer

public void setGenerateServer(boolean generate)
Set the value of the server generation user option.


generateServer

public boolean generateServer()
Return the value of the server generation user option.


setGenerateText

public void setGenerateText(boolean generate)
Set the value of the text generation user option.


generateText

public boolean generateText()
Return the value of the text generation user option.


setGenerateStdlib

public void setGenerateStdlib(boolean generate)
Set the value of the SIDL stdlib generation user option.


generateStdlib

public boolean generateStdlib()
Return the value of the SIDL stdlib generation user option.


setParseCheckOnly

public void setParseCheckOnly(boolean parse)
Set the value of the parser check user option.


parseCheckOnly

public boolean parseCheckOnly()
Return the value of the parser check user option.


setVerbose

public void setVerbose(boolean verbose)
Set the value of the parser check user option.


isVerbose

public boolean isVerbose()
Return the value of the parser check user option.


setCommentLocalOnly

public void setCommentLocalOnly(boolean localOnly)
Set the value of the comment local methods only option.


getCommentLocalOnly

public boolean getCommentLocalOnly()
Return the value of the comment local methods only option.


setShortFileNames

public void setShortFileNames(boolean shortFileNames)
Set the value of the short file names option.


getShortFileNames

public boolean getShortFileNames()
Return the value of the short file names option.


setSuppressTimestamps

public void setSuppressTimestamps(boolean suppress)
Set the value of the timestamp suppression user option.


suppressTimestamps

public boolean suppressTimestamps()
Return the value of the timestamp suppression user option.


setMakePackageSubdirs

public void setMakePackageSubdirs(boolean make_subdirs)
Set the value of the make package subdirs user option.


makePackageSubdirs

public boolean makePackageSubdirs()
Return the value of the make package subdirs user option.


setMakeGlueSubdirs

public void setMakeGlueSubdirs(boolean make_glue_subdirs)
Set the value of the package and glue subdirs user option.


makeGlueSubdirs

public boolean makeGlueSubdirs()
Return the value of the package and glue subdirs user option.


setCxxCheckNullIOR

public void setCxxCheckNullIOR(boolean checkNullIOR)
Set the value of the Cxx NullIORException checking option.


makeCxxCheckNullIOR

public boolean makeCxxCheckNullIOR()
Return the value of the make package subdirs user option.


setMakeLanguageSubdir

public void setMakeLanguageSubdir(boolean make_language_subdir)
Specify whether files for each language should be generated in a separate subdirectory. When the argument is true, all code is placed in a subdirectory whose name corresponds to the language, e.g. c++, f90, etc.


makeLanguageSubdir

public boolean makeLanguageSubdir()
Return the value of the language subdirectory user option.


setOutputDirectory

public void setOutputDirectory(java.lang.String dir)
Set the value of the output directory user option.


getOutputDirectory

public java.lang.String getOutputDirectory()
Return the value of the output directory user option.


setVPathDirectory

public void setVPathDirectory(java.lang.String dir)
Set the value of the vpath directory user option.


getVPathDirectory

public java.lang.String getVPathDirectory()
Return the value of the vpath directory user option.


setTargetLanguage

public void setTargetLanguage(java.lang.String lang)
Set the value of the target language user option.


getTargetLanguage

public java.lang.String getTargetLanguage()

setHasBindC

public void setHasBindC(boolean bindc)
Set if this Fortran compiler supports the iso_c_binding module


getHasBindC

public boolean getHasBindC()

addToRepositoryPath

public void addToRepositoryPath(java.lang.String new_path)
Adds a new entry to the repository path.


removeFromRepositoryPath

public void removeFromRepositoryPath(java.lang.String path)

getRepositoryPath

public java.lang.String getRepositoryPath()
Return the value of the repository path.


addExcluded

public void addExcluded(RegexMatch rm)
Add another regular expression to the list of excluded regular expressions.


getExcludedList

public java.util.List getExcludedList()
Return the list of RegexMatch objects that should be excluded from code generation.


addIncluded

public void addIncluded(java.lang.String str)
Add another regular expression to the list of included regular expressions.


getIncludedList

public java.util.List getIncludedList()
Return the list of RegexMatch objects that should be included from code generation.


setExcludeExternal

public void setExcludeExternal(boolean val)
Set the value of the exclude external symbol code generation user option.


excludeExternal

public boolean excludeExternal()
Return the value of the exclude external symbol code generation user option.


getMakePrefix

public java.lang.String getMakePrefix()
Return the make prefix option.


setMakePrefix

public void setMakePrefix(java.lang.String prefix)
Set the make prefix and makefile name options.