java.lang.Object
com.ibm.j9ddr.vm29.tools.ddrinteractive.ModularityHelper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
iterateClassLoaderClasses
(PrintStream out, ModularityHelper.ClassIteratorFilter filter, ModularityHelper.ClassOutput outputter, String filterArg, com.ibm.j9ddr.vm29.pointer.generated.J9ClassLoaderPointer classLoaderPtr) Traverses through all loaded classes in a classloader.static int
iterateClassLoaderPackages
(PrintStream out, ModularityHelper.PackageIteratorFilter filter, ModularityHelper.PackageOutput outputter, String filterArg, com.ibm.j9ddr.vm29.pointer.generated.J9ClassLoaderPointer classLoaderPtr) Traverses through all loaded packages that are owned by the given class loader.static int
iterateModules
(PrintStream out, ModularityHelper.ModuleIteratorFilter filter, ModularityHelper.ModuleOutput outputter, String filterArg) Traverses through all loaded modules.static int
iteratePackages
(PrintStream out, ModularityHelper.PackageIteratorFilter filter, ModularityHelper.PackageOutput outputter, String filterArg) Traverses through all loaded packages.static boolean
moduleFilterMatchAll
(com.ibm.j9ddr.vm29.pointer.generated.J9ModulePointer modulePtr, String arg) Matches all modules.static void
printJ9Class
(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer classPtr, PrintStream out) Prints the name and hex address of a J9Class.static void
printJ9Module
(com.ibm.j9ddr.vm29.pointer.generated.J9ModulePointer modulePtr, PrintStream out) Prints the name and hex address of a J9Module.static void
printJ9Package
(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) Prints the name and hex address of a J9Package.static void
printPackageExports
(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) Prints the name and hex address of all J9Modules the provided package is exported to.static void
printPackageExportVerbose
(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) Prints the name and hex address of all J9Modules the provided package is exported to.static void
printPackageJ9Module
(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) Prints the details of the J9Module that owns a J9Package.
-
Constructor Details
-
ModularityHelper
public ModularityHelper()
-
-
Method Details
-
moduleFilterMatchAll
public static boolean moduleFilterMatchAll(com.ibm.j9ddr.vm29.pointer.generated.J9ModulePointer modulePtr, String arg) Matches all modules. Fits the ModuleIteratorFilter functional interface.- Parameters:
modulePtr
- unusedarg
- unused- Returns:
- true
-
printJ9Module
public static void printJ9Module(com.ibm.j9ddr.vm29.pointer.generated.J9ModulePointer modulePtr, PrintStream out) throws CorruptDataException Prints the name and hex address of a J9Module. Example: java.base !j9module 0x00007FAC2008EAC8- Parameters:
modulePtr
- The module which is to have its details printed.out
- The PrintStream that the details will be outputted to.- Throws:
CorruptDataException
-
printPackageJ9Module
public static void printPackageJ9Module(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) throws CorruptDataException Prints the details of the J9Module that owns a J9Package. Uses printJ9Module to output the module details.- Parameters:
packagePtr
- The package which is to have its owner's details printed.out
- The PrintStream that the details will be outputted to.- Throws:
CorruptDataException
- See Also:
-
printJ9Package
public static void printJ9Package(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) throws CorruptDataException Prints the name and hex address of a J9Package. Example: moduleB/packageB !j9package 0x00007F84903B5860- Parameters:
packagePtr
- The package which is to have its details printed.out
- The PrintStream that the details will be outputted to.- Throws:
CorruptDataException
-
printJ9Class
public static void printJ9Class(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer classPtr, PrintStream out) throws CorruptDataException Prints the name and hex address of a J9Class. Example: moduleA/packageA/classA !j9class 0x00000000022CCD00- Parameters:
ClassPtr
- The class which is to have its details printed.out
- The PrintStream that the details will be outputted to.- Throws:
CorruptDataException
-
printPackageExportVerbose
public static void printPackageExportVerbose(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) throws CorruptDataException Prints the name and hex address of all J9Modules the provided package is exported to. Output is formated similar to the format of module exports within a module-info.java file. Example: Exports moduleA/packageA !j9module 0x00000000022CCD00 to moduleB !j9module 0x00007FAC2008EAC8- Parameters:
packagePtr
- The package which is to have the modules it is exported to printed.out
- The PrintStream that the result will be output to.- Throws:
CorruptDataException
-
printPackageExports
public static void printPackageExports(com.ibm.j9ddr.vm29.pointer.generated.J9PackagePointer packagePtr, PrintStream out) throws CorruptDataException Prints the name and hex address of all J9Modules the provided package is exported to. Example: moduleB !j9module 0x00007FAC2008EAC8- Parameters:
packagePtr
- The package which is to have the modules it is exported to printed.out
- The PrintStream that the result will be output to.- Throws:
CorruptDataException
-
iterateModules
public static int iterateModules(PrintStream out, ModularityHelper.ModuleIteratorFilter filter, ModularityHelper.ModuleOutput outputter, String filterArg) throws CorruptDataException Traverses through all loaded modules. Uses outputter to print details about modules matched by filter.- Parameters:
out
- The printstream that will be provided to outputter.filter
- Used to determine whether a module will be output. Will be run on all loaded modules.outputter
- Used to output details about a module that was matched by the filter. Will be run on any module that filter returns true for.filterArg
- A string that is to be used as additional data for filter. Will be passed to filter everytime filter is called.- Throws:
CorruptDataException
-
iteratePackages
public static int iteratePackages(PrintStream out, ModularityHelper.PackageIteratorFilter filter, ModularityHelper.PackageOutput outputter, String filterArg) throws CorruptDataException Traverses through all loaded packages. Uses outputter to print details about packages matched by filter.- Parameters:
out
- The printstream that will be provided to outputterfilter
- Used to determine whether a package will be output. Will be run on all loaded packages.outputter
- Used to output details about a package that was matched by the filter. Will be run on any module that filter returns true for.filterArg
- A string that is to be used as additional data for filter. Will be passed to filter everytime filter is called.- Throws:
CorruptDataException
-
iterateClassLoaderPackages
public static int iterateClassLoaderPackages(PrintStream out, ModularityHelper.PackageIteratorFilter filter, ModularityHelper.PackageOutput outputter, String filterArg, com.ibm.j9ddr.vm29.pointer.generated.J9ClassLoaderPointer classLoaderPtr) throws CorruptDataException Traverses through all loaded packages that are owned by the given class loader. Uses outputter to print details about packages matched by filter.- Parameters:
out
- The printstream that will be provided to outputterfilter
- Used to determine whether a packages will be output. Will be run on all loaded packages owned by the class loader.outputter
- Used to output details about a packages that was matched by the filter. Will be run on any packages that filter returns true for.filterArg
- A string that is to be used as additional data for filter. Will be passed to filter everytime filter is called.- Throws:
CorruptDataException
-
iterateClassLoaderClasses
public static int iterateClassLoaderClasses(PrintStream out, ModularityHelper.ClassIteratorFilter filter, ModularityHelper.ClassOutput outputter, String filterArg, com.ibm.j9ddr.vm29.pointer.generated.J9ClassLoaderPointer classLoaderPtr) throws CorruptDataException Traverses through all loaded classes in a classloader. Uses outputter to print details about classes within the classloader that are matched by filter.- Parameters:
out
- The printstream that will be provided to outputterfilter
- Used to determine whether a class will be output. Will be run on all loaded classes owned by the module.outputter
- Used to output details about a class that was matched by the filter. Will be run on any class that filter returns true for.filterArg
- A string that is to be used as additional data for filter. Will be passed to filter everytime filter is called.classLoaderPtr
- The classloader which will have it's classes traversed.- Throws:
CorruptDataException
-