程序包 proguard.io.util
类 IOUtil
- java.lang.Object
-
- proguard.io.util.IOUtil
-
public class IOUtil extends java.lang.Object
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static ClassPoolread(java.io.File file, boolean isLibrary)Reads the classes from the specified jar file and returns them as a class pool.static ClassPoolread(java.io.File file, boolean isLibrary, boolean initializeKotlinMetadata)Reads the classes from the specified jar file and returns them as a class pool.static ClassPoolread(java.io.File file, boolean isLibrary, boolean initializeKotlinMetadata, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader)Reads the classes from the specified jar file and returns them as a class pool.static ClassPoolread(java.lang.String fileName, boolean isLibrary)Reads the classes from the specified jar file and returns them as a class pool.static ClassPoolread(java.lang.String fileName, boolean isLibrary, boolean initializeKotlinMetadata)Reads the classes from the specified jar file and returns them as a class pool.static ClassPoolread(ClassPath classPath, java.lang.String classNameFilter, boolean android, boolean isLibrary, boolean initializeKotlinMetadata, boolean skipNonPublicLibraryClasses, boolean skipNonPublicLibraryClassMembers, boolean ignoreStackMapAttributes, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader)static ClassPoolread(ClassPath classPath, java.lang.String classNameFilter, boolean android, boolean isLibrary, boolean skipNonPublicLibraryClasses, boolean skipNonPublicLibraryClassMembers, boolean ignoreStackMapAttributes, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader)Reads the classes from the specified jar file and returns them as a class pool.static voidwriteJar(ClassPool programClassPool, java.lang.String outputJarFileName)Writes the classes from the given class pool to a specified jar.static voidwriteJar(ClassPool programClassPool, java.lang.String outputJarFileName, java.lang.String mainClassName)Writes the classes from the given class pool to a specified jar.
-
-
-
方法详细资料
-
read
public static ClassPool read(java.lang.String fileName, boolean isLibrary) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
fileName- the file name.isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(java.lang.String fileName, boolean isLibrary, boolean initializeKotlinMetadata) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
fileName- the file name.isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).initializeKotlinMetadata- specifies to initialize the Kotlin metadata model.- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(java.io.File file, boolean isLibrary) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
file- the file.isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(java.io.File file, boolean isLibrary, boolean initializeKotlinMetadata) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
file- the file.isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).initializeKotlinMetadata- specifies to initialize the Kotlin metadata model.- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(java.io.File file, boolean isLibrary, boolean initializeKotlinMetadata, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
file- the name of the file.isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).initializeKotlinMetadata- specifies to initialize the Kotlin metadata model.extraDataEntryReader- Optionally provide a function that wraps the reader in another reader.- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(ClassPath classPath, java.lang.String classNameFilter, boolean android, boolean isLibrary, boolean skipNonPublicLibraryClasses, boolean skipNonPublicLibraryClassMembers, boolean ignoreStackMapAttributes, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader) throws java.io.IOException
Reads the classes from the specified jar file and returns them as a class pool.- 参数:
isLibrary- specifies whether classes should be represented as ProgramClass instances (for processing) or LibraryClass instances (more compact).extraDataEntryReader- Optionally provide a function that wraps the reader in another reader.- 返回:
- a new class pool with the read classes.
- 抛出:
java.io.IOException
-
read
public static ClassPool read(ClassPath classPath, java.lang.String classNameFilter, boolean android, boolean isLibrary, boolean initializeKotlinMetadata, boolean skipNonPublicLibraryClasses, boolean skipNonPublicLibraryClassMembers, boolean ignoreStackMapAttributes, java.util.function.BiFunction<DataEntryReader,ClassVisitor,DataEntryReader> extraDataEntryReader) throws java.io.IOException
- 抛出:
java.io.IOException
-
writeJar
public static void writeJar(ClassPool programClassPool, java.lang.String outputJarFileName) throws java.io.IOException
Writes the classes from the given class pool to a specified jar.- 参数:
programClassPool- the classes to write.outputJarFileName- the name of the output jar file.- 抛出:
java.io.IOException
-
writeJar
public static void writeJar(ClassPool programClassPool, java.lang.String outputJarFileName, java.lang.String mainClassName) throws java.io.IOException
Writes the classes from the given class pool to a specified jar.- 参数:
programClassPool- the classes to write.outputJarFileName- the name of the output jar file.- 抛出:
java.io.IOException
-
-