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)