Package 

Class JimageKt

  • All Implemented Interfaces:

    
    public final class JimageKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • getJrtInputStream

         final static InputStream getJrtInputStream(String fileName, File jreHome)

        Get an input stream to a class file in the JRE.

        Parameters:
        fileName - the file name to the class file in the JRT, including the module
        jreHome - the home directory of the JRE
      • findClassWithModuleNameInJrt

         final static Path findClassWithModuleNameInJrt(String moduleNameAndClassName, File jreHome)

        Find a class with a prepended module name in the JRT (Java 9+)

        Parameters:
        moduleNameAndClassName - the module name and the class name, separated by a slash
        jreHome - the home directory of the JRE
      • findClassInJrt

         final static Path findClassInJrt(String className, File jreHome)

        Find a class in the JRT (Java 9+)

        Parameters:
        className - the class name
        jreHome - the home directory of the JRE
      • forEachClassInJrt

         final static Unit forEachClassInJrt(File jreHome, Function1<Path, Unit> block)

        Iterate over all classes in the JRT (Java 9+)

        Parameters:
        jreHome - the home directory of the JRE
        block - the code that should be executed for each class
      • forEachClassNameInJrt

         final static Unit forEachClassNameInJrt(File jreHome, Function2<String, String, Unit> block)

        Iterate over all class names in the JRT (Java 9+)

        Parameters:
        jreHome - the home directory of the JRE
        block - the code that should be executed for each class name