tom.platform
Class PluginPlatformFactory

java.lang.Object
  extended by tom.platform.PluginPlatformFactory

public class PluginPlatformFactory
extends Object

The PluginPlatform factory is a singleton class that is responsable for the creation of PluginPlatform based on a commandLine seen as a array of string


Field Summary
static String LOG_RADICAL
          Log radical string
 
Method Summary
 PluginPlatform create(String[] commandLine, String logRadical, List<String> inputToCompileList)
          Based on an array of string, the create method return a PluginPlatform or null if something wrong occurs.
 PluginPlatform create(String[] commandLine, String logRadical, List<String> inputToCompileList, Map<String,String> informationTracker)
           
static String extractConfigFileName(String[] commandLine)
          This method analyzes the command line and determines which configuration file should be used.
static PluginPlatformFactory getInstance()
          the singleton accessor
static PluginPlatform getPluginPlatform(Long pluginPlatformID)
           
static Map<Long,PluginPlatform> getPluginPlatformTracker()
           
static PluginPlatform putPluginPlatform(Long pluginPlatformID, PluginPlatform pluginPlatform)
           
static void refreshTopLoggerHandlers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_RADICAL

public static final String LOG_RADICAL
Log radical string

See Also:
Constant Field Values
Method Detail

getPluginPlatformTracker

public static Map<Long,PluginPlatform> getPluginPlatformTracker()

getPluginPlatform

public static PluginPlatform getPluginPlatform(Long pluginPlatformID)

putPluginPlatform

public static PluginPlatform putPluginPlatform(Long pluginPlatformID,
                                               PluginPlatform pluginPlatform)

getInstance

public static PluginPlatformFactory getInstance()
the singleton accessor


create

public PluginPlatform create(String[] commandLine,
                             String logRadical,
                             List<String> inputToCompileList)
Based on an array of string, the create method return a PluginPlatform or null if something wrong occurs. The first argument shall contain a sequence of string -X and configFileName to be able to create the PluginPlatform.


create

public PluginPlatform create(String[] commandLine,
                             String logRadical,
                             List<String> inputToCompileList,
                             Map<String,String> informationTracker)

extractConfigFileName

public static String extractConfigFileName(String[] commandLine)
This method analyzes the command line and determines which configuration file should be used. As the tom scripts already specify a default configuration file which can be overridden by the user, only the last one is taken into account

Parameters:
commandLine - the command line
Returns:
a String containing the path to the configuration file to be used

refreshTopLoggerHandlers

public static void refreshTopLoggerHandlers()
                                     throws InstantiationException,
                                            ClassNotFoundException,
                                            IllegalAccessException
Throws:
InstantiationException
ClassNotFoundException
IllegalAccessException