asia.redact.bracket.properties
Enum Properties.Mode

java.lang.Object
  extended by java.lang.Enum<Properties.Mode>
      extended by asia.redact.bracket.properties.Properties.Mode
All Implemented Interfaces:
Serializable, Comparable<Properties.Mode>
Enclosing interface:
Properties

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);
  
  

Author:
Dave

Enum Constant Summary
BasicToken
           
Compatibility
           
Line
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BasicToken

public static final Properties.Mode BasicToken

Compatibility

public static final Properties.Mode Compatibility

Line

public static final Properties.Mode Line
Method Detail

values

public static Properties.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Properties.Mode c : Properties.Mode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Properties.Mode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011-2013 David R. Smith. All Rights Reserved.