public static enum Properties.Mode extends Enum<Properties.Mode>
Mode is the available combinations of lexer and parser BasicToken - PropertiesLexer and PropertiesParser. Input is a String and a list of tokens is created, then the list is parsed. Trivial. Possibly good for small properties files Compatibility - PropertiesLexer and PropertiesParser. Same parser as above but an attempt is made to retain java.util.Properties compatibility in the parse. Line - LineScanner and PropertiesParser2. Uses the LineScanner which is essentially a BufferedReader, and there is no separate token list, parser works directly off lines. Should work best for larger properties files. Probably the best option full stop. Usage: Properties.Factory.Mode = Properties.Mode.StreamingToken; Properties props = Properties.Factory.getInstance(reader);
| Enum Constant and Description |
|---|
BasicToken |
Compatibility |
Explicit |
Line |
| Modifier and Type | Method and Description |
|---|---|
static Properties.Mode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Properties.Mode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Properties.Mode BasicToken
public static final Properties.Mode Compatibility
public static final Properties.Mode Line
public static final Properties.Mode Explicit
public static Properties.Mode[] values()
for (Properties.Mode c : Properties.Mode.values()) System.out.println(c);
public static Properties.Mode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullCopyright © 2011-2014 David R. Smith. All Rights Reserved.