Class ExceptionResourceGenerator
- java.lang.Object
-
- org.glassfish.pfl.basic.tools.logex.ExceptionResourceGenerator
-
public class ExceptionResourceGenerator extends java.lang.ObjectScans 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 interfaceExceptionResourceGenerator.Arguments
-
Field Summary
Fields Modifier and Type Field Description (package private) Scanner.Actionactionprivate ExceptionResourceGenerator.Argumentsargs
-
Constructor Summary
Constructors Modifier Constructor Description privateExceptionResourceGenerator(java.lang.String[] strs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringgetLoggerName(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 voidmain(java.lang.String[] strs)private voidmsg(java.lang.String string)private voidrun()
-
-
-
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
-
-