Package sootup.java.core
Class JavaModuleIdentifierFactory
java.lang.Object
sootup.java.core.JavaIdentifierFactory
sootup.java.core.JavaModuleIdentifierFactory
- All Implemented Interfaces:
IdentifierFactory
-
Field Summary
Fields inherited from class sootup.java.core.JavaIdentifierFactory
classTypeCache, packageCache, primitiveTypeMap, STATIC_INITIALIZER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetClassType
(String fullyQualyfiedClassNameWithModule) Always creates a new ClassSignature.getClassType
(String className, String packageName) Always creates a new ClassSignature.getClassType
(String className, String packageName, String moduleName) Always creates a new ClassSignature.getClassType
(String className, String packageName, ModuleSignature moduleSignature) static JavaModuleIdentifierFactory
static JavaModuleIdentifierFactory
getInstance
(String module) static JavaModuleIdentifierFactory
getInstance
(ModuleSignature moduleSignature) static ModuleSignature
getModuleSignature
(String moduleName) Returns a unique ModuleSignature.getPackageName
(String packageName) Returns a unique PackageName.getPackageName
(String packageName, String moduleName) Returns a unique PackageName.getPackageName
(String packageName, ModuleSignature moduleSignature) boolean
isMainSubSignature
(MethodSubSignature methodSubSignature) Methods inherited from class sootup.java.core.JavaIdentifierFactory
getAllPrimitiveTypes, getArrayType, getBoxedType, getFieldSignature, getFieldSignature, getFieldSignature, getFieldSubSignature, getMethodSignature, getMethodSignature, getMethodSignature, getMethodSignature, getMethodSubSignature, getPrimitiveType, getStaticInitializerSignature, getType, isConstructorSignature, isConstructorSubSignature, isStaticInitializerSubSignature, parseFieldSignature, parseFieldSubSignature, parseMethodSignature, parseMethodSubSignature
-
Field Details
-
MODULE_INFO_FILE
- See Also:
-
-
Constructor Details
-
JavaModuleIdentifierFactory
public JavaModuleIdentifierFactory()
-
-
Method Details
-
getInstance
-
getInstance
-
getInstance
-
isMainSubSignature
- Specified by:
isMainSubSignature
in interfaceIdentifierFactory
- Overrides:
isMainSubSignature
in classJavaIdentifierFactory
-
getClassType
Description copied from class:JavaIdentifierFactory
Always creates a new ClassSignature. In opposite to PackageSignatures, ClassSignatures are not cached because the are unique per class, and thus reusing them does not make sense.- Specified by:
getClassType
in interfaceIdentifierFactory
- Overrides:
getClassType
in classJavaIdentifierFactory
- Parameters:
className
- the simple class namepackageName
- the Java package name; must not be null use empty string for the default packagePackageName.DEFAULT_PACKAGE
the Java package name- Returns:
- a ClassSignature for a Java class
-
getClassType
Description copied from class:JavaIdentifierFactory
Always creates a new ClassSignature.- Specified by:
getClassType
in interfaceIdentifierFactory
- Overrides:
getClassType
in classJavaIdentifierFactory
- Parameters:
fullyQualyfiedClassNameWithModule
- the fully-qualified name of the class- Returns:
- a ClassSignature for a Java Class
-
getClassType
public ModuleJavaClassType getClassType(@Nonnull String className, @Nonnull String packageName, @Nonnull String moduleName) Always creates a new ClassSignature. In opposite to PackageSignatures and ModuleSignatures, ClassSignatures are not cached because the are unique per class, and thus reusing them does not make sense.- Parameters:
className
- the simple name of the classpackageName
- the declaring packagemoduleName
- the declaring module- Returns:
- a ClassSignature for a Java 9 class
- Throws:
NullPointerException
- if the given module name or package name is null. Use the empty string to denote the unnamed module or the default package.
-
getClassType
public ModuleJavaClassType getClassType(@Nonnull String className, @Nonnull String packageName, @Nonnull ModuleSignature moduleSignature) -
getModuleSignature
Returns a unique ModuleSignature. The method looks up a cache if it already contains a signature with the given module name. If the cache lookup fails a new signature is created. Returns a unique ModuleSignature. The method looks up a cache if it already contains a signature with the given module name. If the cache lookup fails a new signature is created.- Parameters:
moduleName
- the module name; Must not be null. Use the empty string for the unnamed module- Returns:
- a ModuleSignature
- Throws:
NullPointerException
- if the given module name is null. Use the empty string to denote the unnamed module.
-
getPackageName
Description copied from class:JavaIdentifierFactory
Returns a unique PackageName. The method looks up a cache if it already contains a signature with the given package name. If the cache lookup fails a new signature is created.- Specified by:
getPackageName
in interfaceIdentifierFactory
- Overrides:
getPackageName
in classJavaIdentifierFactory
- Parameters:
packageName
- the Java package name; must not be null use empty string for the default packagePackageName.DEFAULT_PACKAGE
- Returns:
- a PackageName
-
getPackageName
Returns a unique PackageName. The methodRef looks up a cache if it already contains a signature with the given package and module name. If the cache lookup fails a new signature is created.- Parameters:
packageName
- the package name; must not be null use empty string for the default packagemoduleName
- the module containing the package; must not be null use empty string for the unnamed moduleModuleSignature.UNNAMED_MODULE
- Returns:
- a ModulePackageName
- Throws:
NullPointerException
- if the given module name or package name is null. Use the empty string to denote the unnamed module or the default package.
-
getPackageName
public ModulePackageName getPackageName(@Nonnull String packageName, @Nonnull ModuleSignature moduleSignature)
-