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 Details

    • getPackageName

      PackageName getPackageName(String packageName)
      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 class
      methodName - the method name
      fqReturnType - the fq return type
      parameters - 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 signature
      methodName - the method name
      fqReturnType - the fq return type
      parameters - 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 signature
      methodName - the method name
      fqReturnType - the fq return type
      parameters - 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 signature
      subSignature - the sub signature
      Returns:
      the method signature
    • parseMethodSignature

      @NonNull MethodSignature parseMethodSignature(@NonNull String methodSignature)
      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 name
      parameterSignatures - the parameter signatures
      returnType - the return type
      Returns:
      the method sub signature
    • parseMethodSubSignature

      @NonNull MethodSubSignature parseMethodSubSignature(@NonNull String methodSubSignature)
      Parses the method sub signature.
      Parameters:
      methodSubSignature - the method sub signature
      Returns:
      the method sub signature
    • parseFieldSignature

      @NonNull FieldSignature parseFieldSignature(@NonNull String fieldSignature)
      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 name
      declaringClassSignature - the declaring class signature
      fieldType - the field type
      Returns:
      the field signature
    • getFieldSignature

      FieldSignature getFieldSignature(String fieldName, ClassType declaringClassSignature, Type fieldType)
      Gets the field signature.
      Parameters:
      fieldName - the field name
      declaringClassSignature - the declaring class signature
      fieldType - 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 signature
      subSignature - the sub signature
      Returns:
      the field signature
    • getFieldSubSignature

      @NonNull FieldSubSignature getFieldSubSignature(@NonNull String name, @NonNull Type type)
      Gets the field sub signature.
      Parameters:
      name - the name
      type - the type
      Returns:
      the field sub signature
    • parseFieldSubSignature

      @NonNull FieldSubSignature parseFieldSubSignature(@NonNull String subSignature)
      Parses the field sub signature.
      Parameters:
      subSignature - the sub signature
      Returns:
      the field sub signature
    • getClassType

      ClassType getClassType(String className, String packageName)
      Gets the class type.
      Parameters:
      className - the class name
      packageName - the package name
      Returns:
      the class type
    • getClassType

      ClassType getClassType(String fullyQualifiedClassName)
      Gets the class type.
      Parameters:
      fullyQualifiedClassName - the fully qualified class name
      Returns:
      the class type
    • getType

      Type getType(String typeName)
      Gets the type.
      Parameters:
      typeName - the type name
      Returns:
      the type
    • getPrimitiveType

      @NonNull Optional<PrimitiveType> getPrimitiveType(@NonNull String typeName)
      Gets the primitive type.
      Parameters:
      typeName - the type name
      Returns:
      the primitive type
    • getBoxedType

      @NonNull ClassType getBoxedType(@NonNull PrimitiveType primitiveType)
    • getArrayType

      ArrayType getArrayType(Type baseType, int dim)
      Gets the array type.
      Parameters:
      baseType - the base type
      dim - the dim
      Returns:
      the array type
    • getStaticInitializerSignature

      MethodSignature getStaticInitializerSignature(ClassType declaringClassSignature)
      Gets the static initializer method signature.
      Parameters:
      declaringClassSignature - the declaring class signature
      Returns:
      the static initializer method signature
    • isStaticInitializerSubSignature

      boolean isStaticInitializerSubSignature(@NonNull MethodSubSignature methodSubSignature)
    • isConstructorSignature

      boolean isConstructorSignature(@NonNull MethodSignature methodSignature)
    • isConstructorSubSignature

      boolean isConstructorSubSignature(@NonNull MethodSubSignature methodSubSignature)
    • isMainSubSignature

      boolean isMainSubSignature(@NonNull MethodSubSignature methodSubSignature)