Class ExceptionResourceGenerator
- java.lang.Object
-
- org.glassfish.pfl.basic.tools.logex.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
ExceptionResourceGenerator.Arguments
-
Field Summary
Fields Modifier and Type Field Description (package private) Scanner.Action
action
private ExceptionResourceGenerator.Arguments
args
-
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()
-
-
-
Field Detail
-
args
private final ExceptionResourceGenerator.Arguments args
-
action
Scanner.Action action
-
-
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
-
-