Package sootup.core
Interface IdentifierFactory
- All Known Implementing Classes:
JavaIdentifierFactory,JavaModuleIdentifierFactory
public interface IdentifierFactory
A factory used for creating language-specific objects representing entities of the language, for
instance
PackageName, MethodSignature and others.-
Method Summary
Modifier and TypeMethodDescriptiongetArrayType(Type baseType, int dim) Gets the array type.@NonNull ClassTypegetBoxedType(@NonNull PrimitiveType primitiveType) getClassType(String fullyQualifiedClassName) Gets the class type.getClassType(String className, String packageName) Gets the class type.@NonNull FieldSignaturegetFieldSignature(@NonNull ClassType declaringClassSignature, @NonNull FieldSubSignature subSignature) Gets the field signature.getFieldSignature(String fieldName, ClassType declaringClassSignature, String fieldType) Gets the field signature.getFieldSignature(String fieldName, ClassType declaringClassSignature, Type fieldType) Gets the field signature.@NonNull FieldSubSignaturegetFieldSubSignature(@NonNull String name, @NonNull Type type) Gets the field sub signature.@NonNull MethodSignaturegetMethodSignature(@NonNull ClassType declaringClassSignature, @NonNull MethodSubSignature subSignature) Gets the method signature.getMethodSignature(String fullyQualifiedNameDeclClass, String methodName, String fqReturnType, List<String> parameters) Gets the method signature.getMethodSignature(ClassType declaringClassSignature, String methodName, String fqReturnType, List<String> parameters) Gets the method signature.getMethodSignature(ClassType declaringClassSignature, String methodName, Type fqReturnType, List<Type> parameters) Gets the method signature.@NonNull MethodSubSignaturegetMethodSubSignature(@NonNull String name, @NonNull Type returnType, @NonNull Iterable<? extends Type> parameterSignatures) Gets the method sub signature.getPackageName(String packageName) Gets the package name.@NonNull Optional<PrimitiveType>getPrimitiveType(@NonNull String typeName) Gets the primitive type.getStaticInitializerSignature(ClassType declaringClassSignature) Gets the static initializer method signature.Gets the type.booleanisConstructorSignature(@NonNull MethodSignature methodSignature) booleanisConstructorSubSignature(@NonNull MethodSubSignature methodSubSignature) booleanisMainSubSignature(@NonNull MethodSubSignature methodSubSignature) booleanisStaticInitializerSubSignature(@NonNull MethodSubSignature methodSubSignature) @NonNull FieldSignatureparseFieldSignature(@NonNull String fieldSignature) Parses the field signature.@NonNull FieldSubSignatureparseFieldSubSignature(@NonNull String subSignature) Parses the field sub signature.@NonNull MethodSignatureparseMethodSignature(@NonNull String methodSignature) Parses the method signature.@NonNull MethodSubSignatureparseMethodSubSignature(@NonNull String methodSubSignature) Parses the method sub signature.
-
Method Details
-
getPackageName
Gets the package name.- Parameters:
packageName- the package name- Returns:
- the package name
-
getMethodSignature
MethodSignature getMethodSignature(String fullyQualifiedNameDeclClass, String methodName, String fqReturnType, List<String> parameters) Gets the method signature.- Parameters:
fullyQualifiedNameDeclClass- the fully qualified name decl classmethodName- the method namefqReturnType- the fq return typeparameters- the parameters- Returns:
- the method signature
-
getMethodSignature
MethodSignature getMethodSignature(ClassType declaringClassSignature, String methodName, String fqReturnType, List<String> parameters) Gets the method signature.- Parameters:
declaringClassSignature- the declaring class signaturemethodName- the method namefqReturnType- the fq return typeparameters- the parameters- Returns:
- the method signature
-
getMethodSignature
MethodSignature getMethodSignature(ClassType declaringClassSignature, String methodName, Type fqReturnType, List<Type> parameters) Gets the method signature.- Parameters:
declaringClassSignature- the declaring class signaturemethodName- the method namefqReturnType- the fq return typeparameters- the parameters- Returns:
- the method signature
-
getMethodSignature
@NonNull MethodSignature getMethodSignature(@NonNull ClassType declaringClassSignature, @NonNull MethodSubSignature subSignature) Gets the method signature.- Parameters:
declaringClassSignature- the declaring class signaturesubSignature- the sub signature- Returns:
- the method signature
-
parseMethodSignature
Parses the method signature.- Parameters:
methodSignature- the method signature- Returns:
- the method signature
-
getMethodSubSignature
@NonNull MethodSubSignature getMethodSubSignature(@NonNull String name, @NonNull Type returnType, @NonNull Iterable<? extends Type> parameterSignatures) Gets the method sub signature.- Parameters:
name- the nameparameterSignatures- the parameter signaturesreturnType- the return type- Returns:
- the method sub signature
-
parseMethodSubSignature
Parses the method sub signature.- Parameters:
methodSubSignature- the method sub signature- Returns:
- the method sub signature
-
parseFieldSignature
Parses the field signature.- Parameters:
fieldSignature- the field signature- Returns:
- the field signature
-
getFieldSignature
FieldSignature getFieldSignature(String fieldName, ClassType declaringClassSignature, String fieldType) Gets the field signature.- Parameters:
fieldName- the field namedeclaringClassSignature- the declaring class signaturefieldType- the field type- Returns:
- the field signature
-
getFieldSignature
FieldSignature getFieldSignature(String fieldName, ClassType declaringClassSignature, Type fieldType) Gets the field signature.- Parameters:
fieldName- the field namedeclaringClassSignature- the declaring class signaturefieldType- the field type- Returns:
- the field signature
-
getFieldSignature
@NonNull FieldSignature getFieldSignature(@NonNull ClassType declaringClassSignature, @NonNull FieldSubSignature subSignature) Gets the field signature.- Parameters:
declaringClassSignature- the declaring class signaturesubSignature- the sub signature- Returns:
- the field signature
-
getFieldSubSignature
Gets the field sub signature.- Parameters:
name- the nametype- the type- Returns:
- the field sub signature
-
parseFieldSubSignature
Parses the field sub signature.- Parameters:
subSignature- the sub signature- Returns:
- the field sub signature
-
getClassType
Gets the class type.- Parameters:
className- the class namepackageName- the package name- Returns:
- the class type
-
getClassType
Gets the class type.- Parameters:
fullyQualifiedClassName- the fully qualified class name- Returns:
- the class type
-
getType
Gets the type.- Parameters:
typeName- the type name- Returns:
- the type
-
getPrimitiveType
Gets the primitive type.- Parameters:
typeName- the type name- Returns:
- the primitive type
-
getBoxedType
-
getArrayType
Gets the array type.- Parameters:
baseType- the base typedim- the dim- Returns:
- the array type
-
getStaticInitializerSignature
Gets the static initializer method signature.- Parameters:
declaringClassSignature- the declaring class signature- Returns:
- the static initializer method signature
-
isStaticInitializerSubSignature
-
isConstructorSignature
-
isConstructorSubSignature
-
isMainSubSignature
-