Class ExceptionResourceGenerator


  • public class ExceptionResourceGenerator
    extends java.lang.Object
    Scans a directory looking for class files. For each class file, if the class file is annotated with ExceptionWrapper, extract the messages and write out into a resource file.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ExceptionResourceGenerator​(java.lang.String[] strs)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String getLoggerName​(java.lang.Class<?> cls)  
      static java.util.List<java.lang.String> getResources​(java.lang.Class<?> cls)
      Generate a list of Strings for a resource file for the given exception and log handling class.
      static void main​(java.lang.String[] strs)  
      private void msg​(java.lang.String string)  
      private void run()  
      • Methods inherited from class java.lang.Object

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

      • ExceptionResourceGenerator

        private ExceptionResourceGenerator​(java.lang.String[] strs)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • msg

        private void msg​(java.lang.String string)
      • getLoggerName

        private static java.lang.String getLoggerName​(java.lang.Class<?> cls)
      • getResources

        public static java.util.List<java.lang.String> getResources​(java.lang.Class<?> cls)
        Generate a list of Strings for a resource file for the given exception and log handling class.
        Parameters:
        cls - The class that describes messages for logging.
        Returns:
        A list of strings suitable for inclusion in a resource bundle.
      • run

        private void run()
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] strs)
                         throws java.io.IOException
        Throws:
        java.io.IOException