Class DescriptionGenerator


  • public final class DescriptionGenerator
    extends java.lang.Object
    A utility application for generating class descriptions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DescriptionModel generate​(java.lang.String source, java.util.Properties configuration, DescriptionModel model)
      Generates a DescriptionModel from the specified source.
      private static java.util.Properties loadProperties​(java.net.URL propertyURL)
      Loads a property set from the specified URL.
      static void main​(java.lang.String[] args)
      Runs the generator, using the 'generator.properties' file for configuration info.
      static void writeMultiFile​(java.lang.String target, DescriptionModel model)
      Writes the class description model to multiple files.
      static void writeSingleFile​(java.lang.String target, DescriptionModel model)
      Writes the class description model to a single file.
      • Methods inherited from class java.lang.Object

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

      • DescriptionGenerator

        public DescriptionGenerator()
    • Method Detail

      • loadProperties

        private static java.util.Properties loadProperties​(java.net.URL propertyURL)
        Loads a property set from the specified URL.
        Parameters:
        propertyURL - the URL.
        Returns:
        The properties.
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Runs the generator, using the 'generator.properties' file for configuration info.
        Parameters:
        args - command line arguments.
        Throws:
        java.lang.Exception - if something goes wrong!
      • generate

        public static DescriptionModel generate​(java.lang.String source,
                                                java.util.Properties configuration,
                                                DescriptionModel model)
        Generates a DescriptionModel from the specified source.
        Parameters:
        source - the source directory.
        configuration - the configuration properties.
        model - the model (null permitted).
        Returns:
        A class description model.
      • writeSingleFile

        public static void writeSingleFile​(java.lang.String target,
                                           DescriptionModel model)
                                    throws java.io.IOException
        Writes the class description model to a single file.
        Parameters:
        target - the target file name.
        model - the class description model.
        Throws:
        java.io.IOException - if there is an I/O problem.
      • writeMultiFile

        public static void writeMultiFile​(java.lang.String target,
                                          DescriptionModel model)
                                   throws java.io.IOException
        Writes the class description model to multiple files.
        Parameters:
        target - the target file name.
        model - the class description model.
        Throws:
        java.io.IOException - if there is an I/O problem.