Class GenerateEnumerations

java.lang.Object
edu.nps.moves.dis7.source.generator.enumerations.GenerateEnumerations

public class GenerateEnumerations extends Object
GenerateEnumerations creates source code from SISO enumeration definitions. Created on Apr 16, 2019 by MOVES Institute, Naval Postgraduate School (NPS), Monterey California USA https://www.nps.edu
Version:
$Id$
Author:
Don McGregor, Mike Bailey and Don Brutzman
  • Constructor Details

    • GenerateEnumerations

      public GenerateEnumerations(String xmlFile, String outputDir, String packageName)
      Constructor
      Parameters:
      xmlFile - input sisoXmlFile
      outputDir - output directory path
      packageName - package name for this set of enumerations
  • Method Details

    • fixName

      public static final String fixName(String name)
      Replace special characters in name with underscore _ character
      Parameters:
      name - name value (typically from XML)
      Returns:
      normalized name
    • htmlize

      public static final String htmlize(String s)
      cleanup special characters in string
      Parameters:
      s - input string
      Returns:
      output string
    • main

      public static void main(String[] args)
      Command-line or solo invocation to run this object
      Parameters:
      args - three configuration arguments, if defaults not used
    • normalizeDescription

      public static String normalizeDescription(String value)
      Normalize string characters to create valid description
      Parameters:
      value - of interest
      Returns:
      normalized value
    • normalizeToken

      public static String normalizeToken(String value)
      Normalize string characters to create valid Java name. Note that unmangled name typically remains available in the description
      Parameters:
      value - of interest
      Returns:
      normalized value