gov.llnl.babel.backend
Class Configuration

java.lang.Object
  extended by gov.llnl.babel.backend.Configuration

public class Configuration
extends java.lang.Object

Configuration is a singleton class that represents the generic backend configuration options such as the maximum array size in a sidl array or whether a symbol is part of the standard library.


Constructor Summary
Configuration()
          Create a new instance of the backend configuration object.
 
Method Summary
static Configuration getInstance()
          Return the singleton instance of the configuration.
 int getMaximumArrayDimension()
          Return the maximum array dimension supported during code generation.
 boolean isBuiltinSymbol(java.lang.String fqn)
          Check whether the symbol name represents one of the standard library classes (e.g., sidl).
static void setInstance(Configuration instance)
          Set the singleton instance of the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Create a new instance of the backend configuration object. Although singleton classes do not typically define a public constructor, this implementation does so to support multiple configurations in the same application. Most implementations, however, will not directly create a configuration through the constructor and will instead use the singleton methods getInstance and setInstance.

Method Detail

getInstance

public static Configuration getInstance()
Return the singleton instance of the configuration. If the instance has not yet been created, then it will be created by this call.


setInstance

public static void setInstance(Configuration instance)
Set the singleton instance of the configuration. Use this function only if you want to change the default configuration implementation or use multiple configurations in the same application. Otherwise, getInstance will automatically create the configuration for you.


getMaximumArrayDimension

public int getMaximumArrayDimension()
Return the maximum array dimension supported during code generation.


isBuiltinSymbol

public boolean isBuiltinSymbol(java.lang.String fqn)
Check whether the symbol name represents one of the standard library classes (e.g., sidl).