Package proguard.io

Class JrtDataEntrySource

java.lang.Object
proguard.io.JrtDataEntrySource
All Implemented Interfaces:
DataEntrySource

public class JrtDataEntrySource extends Object implements DataEntrySource
Data entry source which reads JDK classes using the jrt:/ file system.
See Also:
  • Constructor Details

    • JrtDataEntrySource

      public JrtDataEntrySource(Path javaHome, Path jrtFsJarPath, @Nullable @Nullable String moduleName)
  • Method Details

    • tryCreate

      @Nullable public static @Nullable JrtDataEntrySource tryCreate(Path javaHome, @Nullable @Nullable String moduleName)
      Tries to create an instance of JrtDataEntrySource. Returns null if javaHome does not point to a valid JAVA_HOME which contains lib/jrt-fs.jar.
      Parameters:
      javaHome - path to JAVA_HOME whose classes should be read
      moduleName - name of the module whose classes should be read; null to read the classes of all modules
    • pumpDataEntries

      public void pumpDataEntries(DataEntryReader dataEntryReader) throws IOException
      Description copied from interface: DataEntrySource
      Applies the given DataEntryReader to all data entries that the implementation can provide.
      Specified by:
      pumpDataEntries in interface DataEntrySource
      Throws:
      IOException