程序包 proguard
类 ConfigurationParser
- java.lang.Object
-
- proguard.ConfigurationParser
-
- 所有已实现的接口:
java.lang.AutoCloseable
public class ConfigurationParser extends java.lang.Object implements java.lang.AutoCloseableThis class parses ProGuard configurations. Configurations can be read from an array of arguments or from a configuration file or URL. External references in file names ('<...>') can be resolved against a given set of properties.
-
-
构造器概要
构造器 构造器 说明 ConfigurationParser(java.io.File file)已过时。Temporary code for backward compatibility in Obclipse.ConfigurationParser(java.io.File file, java.util.Properties properties)Creates a new ConfigurationParser for the given file and the given Properties.ConfigurationParser(java.lang.String[] args, java.io.File baseDir, java.util.Properties properties)Creates a new ConfigurationParser for the given String arguments, with the given base directory and the given Properties.ConfigurationParser(java.lang.String[] args, java.util.Properties properties)Creates a new ConfigurationParser for the given String arguments and the given Properties.ConfigurationParser(java.lang.String lines, java.lang.String description, java.io.File baseDir, java.util.Properties properties)Creates a new ConfigurationParser for the given lines, with the given base directory and the given Properties.ConfigurationParser(java.net.URL url, java.util.Properties properties)Creates a new ConfigurationParser for the given URL and the given Properties.ConfigurationParser(WordReader reader, java.util.Properties properties)Creates a new ConfigurationParser for the given word reader and the given Properties.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Closes the configuration.static voidmain(java.lang.String[] args)A main method for testing configuration parsing.voidparse(Configuration configuration)Parses and returns the configuration.voidparse(Configuration configuration, java.util.function.BiConsumer<java.lang.String,java.lang.String> unknownOptionHandler)Parses and returns the configuration.ClassSpecificationparseClassSpecificationArguments()ClassSpecificationparseClassSpecificationArguments(boolean readFirstWord, boolean allowClassMembers, boolean allowValues)Parses and returns a class specification.
-
-
-
构造器详细资料
-
ConfigurationParser
public ConfigurationParser(java.lang.String[] args, java.util.Properties properties) throws java.io.IOExceptionCreates a new ConfigurationParser for the given String arguments and the given Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(java.lang.String[] args, java.io.File baseDir, java.util.Properties properties) throws java.io.IOExceptionCreates a new ConfigurationParser for the given String arguments, with the given base directory and the given Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(java.lang.String lines, java.lang.String description, java.io.File baseDir, java.util.Properties properties) throws java.io.IOExceptionCreates a new ConfigurationParser for the given lines, with the given base directory and the given Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(java.io.File file) throws java.io.IOException已过时。Temporary code for backward compatibility in Obclipse.Creates a new ConfigurationParser for the given file, with the system Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(java.io.File file, java.util.Properties properties) throws java.io.IOExceptionCreates a new ConfigurationParser for the given file and the given Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(java.net.URL url, java.util.Properties properties) throws java.io.IOExceptionCreates a new ConfigurationParser for the given URL and the given Properties.- 抛出:
java.io.IOException
-
ConfigurationParser
public ConfigurationParser(WordReader reader, java.util.Properties properties) throws java.io.IOException
Creates a new ConfigurationParser for the given word reader and the given Properties.- 抛出:
java.io.IOException
-
-
方法详细资料
-
parse
public void parse(Configuration configuration) throws ParseException, java.io.IOException
Parses and returns the configuration.- 参数:
configuration- the configuration that is updated as a side-effect.- 抛出:
ParseException- if the any of the configuration settings contains a syntax error.java.io.IOException- if an IO error occurs while reading a configuration.
-
parse
public void parse(Configuration configuration, java.util.function.BiConsumer<java.lang.String,java.lang.String> unknownOptionHandler) throws ParseException, java.io.IOException
Parses and returns the configuration.- 参数:
configuration- the configuration that is updated as a side-effect.unknownOptionHandler- optional handler for unknown options; if null then aParseExceptionis thrown when encountering an unknown option.- 抛出:
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.IOExceptionCloses the configuration.- 指定者:
close在接口中java.lang.AutoCloseable- 抛出:
java.io.IOException- if an IO error occurs while closing the configuration.
-
parseClassSpecificationArguments
public ClassSpecification parseClassSpecificationArguments() throws ParseException, java.io.IOException
- 抛出:
ParseExceptionjava.io.IOException
-
parseClassSpecificationArguments
public ClassSpecification parseClassSpecificationArguments(boolean readFirstWord, boolean allowClassMembers, boolean allowValues) throws ParseException, java.io.IOException
Parses and returns a class specification. For example: "public class SomeClass { public void someMethod(); }"- 抛出:
ParseException- if the class specification contains a syntax error.java.io.IOException- if an IO error occurs while reading the class specification.
-
main
public static void main(java.lang.String[] args)
A main method for testing configuration parsing.
-
-