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.getBoxedType
(PrimitiveType primitiveType) getClassType
(String fullyQualifiedClassName) Gets the class type.getClassType
(String className, String packageName) Gets the class type.getFieldSignature
(String fieldName, ClassType declaringClassSignature, String fieldType) Gets the field signature.getFieldSignature
(String fieldName, ClassType declaringClassSignature, Type fieldType) Gets the field signature.getFieldSignature
(ClassType declaringClassSignature, FieldSubSignature subSignature) Gets the field signature.getFieldSubSignature
(String name, Type type) Gets the field sub 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.getMethodSignature
(ClassType declaringClassSignature, MethodSubSignature subSignature) Gets the method signature.getMethodSubSignature
(String name, Type returnType, Iterable<? extends Type> parameterSignatures) Gets the method sub signature.getPackageName
(String packageName) Gets the package name.getPrimitiveType
(String typeName) Gets the primitive type.getStaticInitializerSignature
(ClassType declaringClassSignature) Gets the static initializer method signature.Gets the type.boolean
isConstructorSignature
(MethodSignature methodSignature) boolean
isConstructorSubSignature
(MethodSubSignature methodSubSignature) boolean
isMainSubSignature
(MethodSubSignature methodSubSignature) boolean
isStaticInitializerSubSignature
(MethodSubSignature methodSubSignature) parseFieldSignature
(String fieldSignature) Parses the field signature.parseFieldSubSignature
(String subSignature) Parses the field sub signature.parseMethodSignature
(String methodSignature) Parses the method signature.parseMethodSubSignature
(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
-