Package sootup.java.core
Class JavaModuleIdentifierFactory
java.lang.Object
sootup.java.core.JavaIdentifierFactory
sootup.java.core.JavaModuleIdentifierFactory
- All Implemented Interfaces:
IdentifierFactory
-
Field Summary
FieldsFields inherited from class sootup.java.core.JavaIdentifierFactory
classTypeCache, packageCache, primitiveTypeMap, STATIC_INITIALIZER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClassType(@NonNull String className, @NonNull String packageName, @NonNull String moduleName) Always creates a new ClassSignature.getClassType(@NonNull String className, @NonNull String packageName, @NonNull ModuleSignature moduleSignature) getClassType(String fullyQualyfiedClassNameWithModule) Always creates a new ClassSignature.getClassType(String className, String packageName) Always creates a new ClassSignature.static JavaModuleIdentifierFactorystatic JavaModuleIdentifierFactorygetInstance(@NonNull String module) static JavaModuleIdentifierFactorygetInstance(@NonNull ModuleSignature moduleSignature) static ModuleSignaturegetModuleSignature(@NonNull String moduleName) Returns a unique ModuleSignature.getPackageName(@NonNull String packageName) Returns a unique PackageName.getPackageName(@NonNull String packageName, @NonNull String moduleName) Returns a unique PackageName.getPackageName(@NonNull String packageName, @NonNull ModuleSignature moduleSignature) booleanisMainSubSignature(@NonNull MethodSubSignature methodSubSignature) Checks whether the given method sub signature is the main method signatureMethods 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, parseMethodSubSignatureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sootup.core.IdentifierFactory
getMainSubSignature
-
Field Details
-
MODULE_INFO_FILE
- See Also:
-
-
Constructor Details
-
JavaModuleIdentifierFactory
public JavaModuleIdentifierFactory()
-
-
Method Details
-
getInstance
-
getInstance
-
getInstance
-
isMainSubSignature
Description copied from interface:IdentifierFactoryChecks whether the given method sub signature is the main method signature- Specified by:
isMainSubSignaturein interfaceIdentifierFactory- Overrides:
isMainSubSignaturein classJavaIdentifierFactory- Returns:
-
getClassType
Description copied from class:JavaIdentifierFactoryAlways 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:
getClassTypein interfaceIdentifierFactory- Overrides:
getClassTypein classJavaIdentifierFactory- Parameters:
className- the simple class namepackageName- the Java package name; must not be null use empty string for the default packagePackageName.DEFAULT_PACKAGEthe Java package name- Returns:
- a ClassSignature for a Java class
-
getClassType
Description copied from class:JavaIdentifierFactoryAlways creates a new ClassSignature.- Specified by:
getClassTypein interfaceIdentifierFactory- Overrides:
getClassTypein 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:JavaIdentifierFactoryReturns 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:
getPackageNamein interfaceIdentifierFactory- Overrides:
getPackageNamein 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)
-