Class Main

java.lang.Object
eu.bandm.tools.umod.Main

public class Main extends Object
Class with the main entry methods, both by command line or programmatically.
  • Field Details

  • Constructor Details

    • Main

      public Main()
  • Method Details

    • stream2umod

      @Opt public static UMod.Forest stream2umod(@Opt UMod.Forest forest, InputStream str, String sourcefilename, MessageReceiver<SimpleMessage<@Opt XMLDocumentIdentifier>> msg)
      Main worker method, can be called from other classes.
      Parameters:
      forest - incomplete meta-model to be completed
      str - source text describing the umod meta-model
      sourcefilename - to locate error messages
      msg - target of all messages
    • stream2umod

      @Opt public static UMod.Forest stream2umod(@Opt UMod.Forest forest, InputStream str, String sourcefilename, MessageReceiver<SimpleMessage<@Opt XMLDocumentIdentifier>> msg, ContentPrinter cp)
      Main worker method, can be called from other classes.
      Parameters:
      forest - incomplete meta-model to be completed
      str - source text describing the umod meta-model
      sourcefilename - to locate error messages
      msg - target of all messages
      cp - additional diagnosis/debug parameter which prints the parsed source text
    • getVersionValue

      public static String getVersionValue()
    • log

      protected static void log(String s)
      Send a logging message to the standard drains.
      Parameters:
      s - the text of the message
    • logS

      protected static void logS(String s)
      Send a logging-start message to the standard drains.
      Parameters:
      s - the text of the message
    • logE

      protected static void logE(String s)
      Send a logging-start message to the standard drains.
      Parameters:
      s - the text of the message
    • checkErrors

      protected static void checkErrors(String text)
      Exit the application when errors or failures have occured.
      Parameters:
      text - to be printed to the terminal
    • main

      public static void main(String[] args) throws Exception
      Main entry point, called by the command line. Parses one or multiple input files into a meta-model, generates the Java source for the model elements and visitors, and generates documentation files.
      Parameters:
      args - the command line arguments.
      Throws:
      Exception