proguard
Class ConfigurationParser

java.lang.Object
  extended by proguard.ConfigurationParser

public class ConfigurationParser
extends java.lang.Object

This class parses ProGuard configurations. Configurations can be read from an array of arguments or from a configuration file or URL.


Constructor Summary
ConfigurationParser(java.io.File file)
          Creates a new ConfigurationParser for the given file.
ConfigurationParser(java.lang.String[] args)
          Creates a new ConfigurationParser for the given String arguments.
ConfigurationParser(java.lang.String[] args, java.io.File baseDir)
          Creates a new ConfigurationParser for the given String arguments, with the given base directory.
ConfigurationParser(java.net.URL url)
          Creates a new ConfigurationParser for the given URL.
 
Method Summary
 void close()
          Closes the configuration.
static void main(java.lang.String[] args)
          A main method for testing configuration parsing.
 void parse(Configuration configuration)
          Parses and returns the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationParser

public ConfigurationParser(java.lang.String[] args)
                    throws java.io.IOException
Creates a new ConfigurationParser for the given String arguments.

Throws:
java.io.IOException

ConfigurationParser

public ConfigurationParser(java.lang.String[] args,
                           java.io.File baseDir)
                    throws java.io.IOException
Creates a new ConfigurationParser for the given String arguments, with the given base directory.

Throws:
java.io.IOException

ConfigurationParser

public ConfigurationParser(java.io.File file)
                    throws java.io.IOException
Creates a new ConfigurationParser for the given file.

Throws:
java.io.IOException

ConfigurationParser

public ConfigurationParser(java.net.URL url)
                    throws java.io.IOException
Creates a new ConfigurationParser for the given URL.

Throws:
java.io.IOException
Method Detail

parse

public void parse(Configuration configuration)
           throws ParseException,
                  java.io.IOException
Parses and returns the configuration.

Parameters:
configuration - the configuration that is updated as a side-effect.
Throws:
ParseException - if the any of the configuration settings contains a syntax error.
java.io.IOException - if an IO error occurs while reading a configuration.

close

public void close()
           throws java.io.IOException
Closes the configuration.

Throws:
java.io.IOException - if an IO error occurs while closing the configuration.

main

public static void main(java.lang.String[] args)
A main method for testing configuration parsing.