net.sf.tomp.xtcl
Class CompilerFactory

java.lang.Object
  extended by net.sf.tomp.xtcl.CompilerFactory

public class CompilerFactory
extends java.lang.Object

Simple CompilerFactory, creates Compilers, either the standard ones or of the specified class

Author:
tomp

Constructor Summary
CompilerFactory()
           
 
Method Summary
static void cloneCompilers(Context srcContext, Context targetContext)
          Clones all compilers to a target Context
static Compiler createCompiler(java.lang.Class compClass, Context context)
          Similar to createCompiler but creates Compiler with the specified Class compClass
static Compiler createCompiler(java.lang.String compClassName, Context context)
          Similar to createDefaultCompilers but creates Compiler with the specified classname compClassName
static void createDefaultCompilers(Context context)
          Create the default Compiler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerFactory

public CompilerFactory()
Method Detail

createDefaultCompilers

public static void createDefaultCompilers(Context context)
                                   throws java.lang.InstantiationException,
                                          java.lang.IllegalAccessException,
                                          java.lang.ClassNotFoundException
Create the default Compiler. Class of the default Compiler may be specified via System.property "net.sf.tomp.xtcl.Compiler"

Parameters:
context - Context to be set to the new Compiler
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException - if Compiler class initialization fails

createCompiler

public static Compiler createCompiler(java.lang.String compClassName,
                                      Context context)
                               throws java.lang.InstantiationException,
                                      java.lang.IllegalAccessException,
                                      java.lang.ClassNotFoundException
Similar to createDefaultCompilers but creates Compiler with the specified classname compClassName

Parameters:
compClassName - Compiler class name
context - Context to be set to the new Compiler
Returns:
the created Compiler
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException - if Compiler class initialization fails

createCompiler

public static Compiler createCompiler(java.lang.Class compClass,
                                      Context context)
                               throws java.lang.InstantiationException,
                                      java.lang.IllegalAccessException,
                                      java.lang.ClassNotFoundException
Similar to createCompiler but creates Compiler with the specified Class compClass

Parameters:
compClass - the Compiler class
context -
Returns:
the created Compiler
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException - if Compiler class initialization fails

cloneCompilers

public static void cloneCompilers(Context srcContext,
                                  Context targetContext)
                           throws java.lang.InstantiationException,
                                  java.lang.IllegalAccessException,
                                  java.lang.ClassNotFoundException
Clones all compilers to a target Context

Parameters:
srcContext - the source Context
targetContext - the target Context
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException - if Compiler class initialization fails


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.