Top Description Inners Fields Constructors Methods
org.glassfish.pfl.basic.tools.logex

public Class ExceptionResourceGenerator

extends Object
Class Inheritance
Imports
java.io.File, .IOException, java.lang.reflect.Field, .Modifier, java.util.ArrayList, .Date, .List, .Map, org.glassfish.pfl.basic.logex.ExceptionWrapper, .WrapperGenerator, org.glassfish.pfl.basic.tools.argparser.ArgParser, .DefaultValue, .Help, org.glassfish.pfl.basic.tools.file.FileWrapper, .Scanner

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.
Author
ken

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface

Field Summary

Modifier and TypeField and Description
pack-priv Scanner.Action
action

References Deprecated Scanner.Action is deprecated or references (maybe indirectly) at least one deprecated element.
private final ExceptionResourceGenerator.Arguments

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
public static List<String>

Returns:

A list of strings suitable for inclusion in a resource bundle.
getResources
(final Class<?>
The class that describes messages for logging.
cls
)

Generate a list of Strings for a resource file for the given exception and log handling class.

public static void
main(String[] strs)

private void
msg(String string)

private void
run()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actionback to summary
pack-priv Scanner.Action action

References Deprecated

Scanner.Action is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

argsback to summary
private final ExceptionResourceGenerator.Arguments args

Constructor Detail

ExceptionResourceGeneratorback to summary
private ExceptionResourceGenerator(String[] strs) throws IOException

Method Detail

getLoggerNameback to summary
private static String getLoggerName(Class<?> cls)
getResourcesback to summary
public static List<String> getResources(final Class<?> cls)

Generate a list of Strings for a resource file for the given exception and log handling class.

Parameters
cls:Class<?>

The class that describes messages for logging.

Returns:List<String>

A list of strings suitable for inclusion in a resource bundle.

mainback to summary
public static void main(String[] strs) throws IOException
msgback to summary
private void msg(String string)
runback to summary
private void run() throws IOException
org.glassfish.pfl.basic.tools.logex back to summary

private Interface ExceptionResourceGenerator.Arguments


Method Summary

Modifier and TypeMethod and Description
public File
public File
public int

Method Detail

destinationback to summary
public File destination()
Annotations
@Help:Destination file for resources
@DefaultValue
sourceback to summary
public File source()
Annotations
@Help:Source directory for classes to scan
@DefaultValue
verboseback to summary
public int verbose()
Annotations
@Help:Set to >0 to get information about actions taken for every file. Larger values give more detail.
@DefaultValue:0