Class CodeGeneratorFactory


  • public class CodeGeneratorFactory
    extends java.lang.Object
    A factory class to load the appropriate type of Code Generator. The CodeGenerator implementation is used to write out the concrete plan.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONDOR_CODE_GENERATOR_CLASS
      The name of the class implementing the condor code generator.
      static java.lang.String DEFAULT_PACKAGE_NAME
      The default package where the all the implementing classes are supposed to reside.
      static java.lang.String STAMPEDE_EVENT_GENERATOR_CLASS
      The name of the class implementing the Stampede Event Generator
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CodeGenerator loadInstance​(PegasusBag bag)
      This method loads the appropriate implementing code generator as specified by the user at runtime.
      static CodeGenerator loadInstance​(PegasusBag bag, java.lang.String className)
      This method loads the appropriate code generator as specified by the user at runtime.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_PACKAGE_NAME

        public static final java.lang.String DEFAULT_PACKAGE_NAME
        The default package where the all the implementing classes are supposed to reside.
        See Also:
        Constant Field Values
      • CONDOR_CODE_GENERATOR_CLASS

        public static final java.lang.String CONDOR_CODE_GENERATOR_CLASS
        The name of the class implementing the condor code generator.
        See Also:
        Constant Field Values
      • STAMPEDE_EVENT_GENERATOR_CLASS

        public static final java.lang.String STAMPEDE_EVENT_GENERATOR_CLASS
        The name of the class implementing the Stampede Event Generator
        See Also:
        Constant Field Values
    • Constructor Detail

      • CodeGeneratorFactory

        public CodeGeneratorFactory()
    • Method Detail

      • loadInstance

        public static CodeGenerator loadInstance​(PegasusBag bag)
                                          throws CodeGeneratorFactoryException
        This method loads the appropriate implementing code generator as specified by the user at runtime. If the megadag mode is specified in the options, then that is used to load the implementing class, overriding the submit mode specified in the properties file.
        Parameters:
        bag - the bag of initialization objects.
        Returns:
        the instance of the class implementing this interface.
        Throws:
        CodeGeneratorFactoryException - that nests any error that might occur during the instantiation of the implementation.
        See Also:
        DEFAULT_PACKAGE_NAME
      • loadInstance

        public static CodeGenerator loadInstance​(PegasusBag bag,
                                                 java.lang.String className)
                                          throws CodeGeneratorFactoryException
        This method loads the appropriate code generator as specified by the user at runtime.
        Parameters:
        bag - the bag of initialization objects.
        className - the name of the implementing class.
        Returns:
        the instance of the class implementing this interface.
        Throws:
        CodeGeneratorFactoryException - that nests any error that might occur during the instantiation of the implementation.
        See Also:
        DEFAULT_PACKAGE_NAME