Class ModularCodeGenerator

    • Constructor Detail

      • ModularCodeGenerator

        public ModularCodeGenerator​(NamedObj container,
                                    java.lang.String name)
                             throws IllegalActionException,
                                    NameDuplicationException
        Create a new instance of the Modular java code generator.
        Parameters:
        container - The container.
        name - The name of the Java code generator.
        Throws:
        IllegalActionException - If the super class throws the exception or error occurs when setting the file path.
        NameDuplicationException - If the super class throws the exception or an error occurs when setting the file path.
    • Method Detail

      • createActorGraph

        public java.lang.StringBuffer createActorGraph()
                                                throws IllegalActionException
        Return the firings() method.
        Returns:
        The code for the firings method.
        Throws:
        IllegalActionException - If thrown while getting the token consumption rates for an error message
      • generateCode

        public int generateCode​(java.lang.StringBuffer code)
                         throws KernelException
        Generate code. This is the main entry point.
        Overrides:
        generateCode in class GenericCodeGenerator
        Parameters:
        code - The code buffer into which to generate the code.
        Returns:
        The return value of the last subprocess that was executed. or -1 if no commands were executed.
        Throws:
        KernelException - If a type conflict occurs or the model is running.