Package com.illumon.util.tools
Class PropertyInspector
java.lang.Object
com.illumon.util.tools.PropertyInspector
public class PropertyInspector extends Object
Processes a hierarchical set of property files and outputs a list of properties and values.
Minimum use is with just the starting property file specified (-pf). This will return a list of
all properties and their effective values (last setting of a value takes precedence).
-pn allows specification of a property name or regex to search for. All instances that match will
be reported, along with their value, file, and line number.
-fm allows a choice of duplicate detection. -pn is ignored when -fm is either ALL_DUPLICATES or
FILE_DUPLICATES. ALL_DUPLICATES shows all properties that are defined more than once across the
hierarchy of property files. FILE_DUPLICATES shows all properties that are defined more than once
within a single property file.
-pf can specify a fully-qualified property file to start with (path + name), or just a name to
load from the classpath. If a fully-qualified file is used, any included files must be in the same
path, or available from the classpath.
If -cs is included in the arguments, the results will be formatted as CSV, for easier importing
into other tools.
-in can specify a file containing a list of property names or regular expressions that, in COMPARE mode,
will be checked against the input properties file to make sure they are present. Lines beginning with # are
comments and ignored, as are blank lines. Lines beginning with / are treated as regular expressions. All other lines
are considered to be exact matches.
-ex is the same as -in, but in COMPARE mode the contents of the -ex file will be checked to make sure they are NOT
present in the input properties file.
-
Method Details
-
main
Run the utility.- Parameters:
args
- The arguments to use. See class description for information about what the arguments are.
-