|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nrs.util.PropertiesValidator
Checks that source files' references to properties actually exist. This is a command line utility that can be run as
java -cp nrsutils.jar nrs.util.PropertiesValidator
Mandatory argumentsjava -cp nrsutils.jar nrs.util.PropertiesValidator -p messages -d src -prefix getMessage(
which would check all Java source files under the src directory for references to getMessage(. Anything between the next two quote characters will be checked against the messages.properties file. If the reference doesn't exist an error will be reported.
Constructor Summary | |
PropertiesValidator(java.lang.String props,
java.lang.String dir,
java.lang.String prefix)
Creates a new instance of PropertiesValidator |
Method Summary | |
void |
checkProperties(java.io.File dirToCheck)
Using the specified directory as a starting point check for properties |
static void |
main(java.lang.String[] args)
Initialise and start the utility |
void |
printFrequency(boolean zeroFrequency)
Print out the frequency of the keys |
void |
setFrequency(boolean frequency)
Print the frequencies of the keys used |
void |
setVerbose(boolean verbose)
Set verbose output |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertiesValidator(java.lang.String props, java.lang.String dir, java.lang.String prefix)
props
- the properties file to checkdir
- the directory to start searching fromprefix
- the prefix which uniquely identifies a messageMethod Detail |
public void setVerbose(boolean verbose)
verbose
- if true generate extra logging informationpublic void setFrequency(boolean frequency)
frequency
- if true print frequency of keyspublic void checkProperties(java.io.File dirToCheck)
dirToCheck
- the directory to start checking frompublic void printFrequency(boolean zeroFrequency)
zeroFrequency
- only print out keys with no matchespublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |