asia.redact.bracket.properties
Class Properties.Factory

java.lang.Object
  extended by asia.redact.bracket.properties.Properties.Factory
Enclosing interface:
Properties

public static final class Properties.Factory
extends Object

 The default mode is the trivial memory mode, which is BasicToken.
 
 You can change the Mode of the factory globally by setting it to a different value like this:
 
 Properties.mode = Mode.Line;
 
 which changes the mode (and thus the parser/lexer) to Line. 
 
 

Author:
Dave

Field Summary
static Properties.Mode mode
           
 
Constructor Summary
Properties.Factory()
           
 
Method Summary
static Properties getDotInstance(InputStream in)
           
static Properties getDotInstance(Reader reader)
           
static Properties getInstance()
           
static Properties getInstance(InputStream in)
           
static Properties getInstance(Properties legacy)
          Load from a legacy Properties file object
static Properties getInstance(Reader reader)
           
static Properties getInstance(String baseName, Locale locale)
          baseName is something like a.b.c.MyProperty which with Locale.AU will be a search path like /a.b.c.MyProperty_en_AU.properties
static Properties getInstance(URL url)
           
static Properties getInstanceFromXML(File file)
          The input file must have been generated by OutputAdapter.writeAsXML(Writer) or meet the same requirements as regards form.
static Properties sortedInstance(Properties props)
           
static Properties sortedInstance(Properties props, Comparator<String> comp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mode

public static Properties.Mode mode
Constructor Detail

Properties.Factory

public Properties.Factory()
Method Detail

getInstance

public static Properties getInstance()

getInstance

public static Properties getInstance(URL url)

getInstance

public static Properties getInstance(Reader reader)

getInstance

public static Properties getInstance(InputStream in)

getInstance

public static Properties getInstance(Properties legacy)
Load from a legacy Properties file object

Parameters:
legacy -
Returns:

getInstance

public static Properties getInstance(String baseName,
                                     Locale locale)
baseName is something like a.b.c.MyProperty which with Locale.AU will be a search path like /a.b.c.MyProperty_en_AU.properties

Parameters:
baseName -
locale -
Returns:

getInstanceFromXML

public static Properties getInstanceFromXML(File file)
The input file must have been generated by OutputAdapter.writeAsXML(Writer) or meet the same requirements as regards form. This is not yet documented but looking at the test case files you can figure it out.

Parameters:
file -
Returns:
Throws:
RuntimeException - if it fails due to I/O

sortedInstance

public static Properties sortedInstance(Properties props)

sortedInstance

public static Properties sortedInstance(Properties props,
                                        Comparator<String> comp)

getDotInstance

public static Properties getDotInstance(Reader reader)

getDotInstance

public static Properties getDotInstance(InputStream in)


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