Package soot
Class ModuleUtil
- java.lang.Object
-
- soot.ModuleUtil
-
public class ModuleUtil extends Object
A utility class for dealing with java 9 modules and module dependencies.- Author:
- Andreas Dann
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModuleUtil.ModuleClassNameWrapperWrapper class for backward compatibility with existing soot code In existing soot code classes are resolved based on their name without specifying a module to avoid changing all occurrences of String constants in Soot this classes deals with these String constants.
-
Constructor Summary
Constructors Constructor Description ModuleUtil(Singletons.Global g)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdeclaringModule(String className, String toModuleName)Finds the module that exports the given class to the given module.booleanisInModuleMode()Check if Soot is run with module mode enabled.ModuleUtil.ModuleClassNameWrappermakeWrapper(String className)static booleanmodule_mode()Check if Soot is run with module mode enabled.static ModuleUtilv()
-
-
-
Constructor Detail
-
ModuleUtil
public ModuleUtil(Singletons.Global g)
-
-
Method Detail
-
v
public static ModuleUtil v()
-
makeWrapper
public final ModuleUtil.ModuleClassNameWrapper makeWrapper(String className)
-
module_mode
public static boolean module_mode()
Check if Soot is run with module mode enabled.- Returns:
- true, if module mode is used
-
isInModuleMode
public boolean isInModuleMode()
Check if Soot is run with module mode enabled.- Returns:
- true, if module mode is used
-
declaringModule
public final String declaringModule(String className, String toModuleName)
Finds the module that exports the given class to the given module.- Parameters:
className- the requested classtoModuleName- the module from which the request is made- Returns:
- the module's name that exports the class to the given module
-
-