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 ClassType
getBoxedType
(@NonNull PrimitiveType primitiveType) getClassType
(String fullyQualifiedClassName) Gets the class type.getClassType
(String className, String packageName) Gets the class type.@NonNull FieldSignature
getFieldSignature
(@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 FieldSubSignature
getFieldSubSignature
(@NonNull String name, @NonNull Type type) Gets the field sub signature.@NonNull MethodSignature
getMethodSignature
(@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 MethodSubSignature
getMethodSubSignature
(@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.boolean
isConstructorSignature
(@NonNull MethodSignature methodSignature) boolean
isConstructorSubSignature
(@NonNull MethodSubSignature methodSubSignature) boolean
isMainSubSignature
(@NonNull MethodSubSignature methodSubSignature) boolean
isStaticInitializerSubSignature
(@NonNull MethodSubSignature methodSubSignature) @NonNull FieldSignature
parseFieldSignature
(@NonNull String fieldSignature) Parses the field signature.@NonNull FieldSubSignature
parseFieldSubSignature
(@NonNull String subSignature) Parses the field sub signature.@NonNull MethodSignature
parseMethodSignature
(@NonNull String methodSignature) Parses the method signature.@NonNull MethodSubSignature
parseMethodSubSignature
(@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
-