RivanParmar/androlabs

[Task]: Complete Module.kt

RivanParmar opened this issue · 0 comments

Description
Task to complete the Module.kt interface.
The interface will be used to open modules present in the project.

Implementation

  • The interface should implement UserDataHolderEx from the Kotlin compiler.
  • The interface will have 9 functions.
  • These functions are:
    getRootFile()
    • This function should have a return type of java.io.File
    getName()
    • This function should have a return type of String
    • The function should return getRootFile().name by default
    open()
    • This function should not return anything
    • The function should be annotated with Throws(IOException::class)
    • The function will be responsible for parsing the contents of the module and may throw IOException of something goes wrong during parsing
    clear()
    • This function should not return anything
    • The function will be responsible for removing all the indexed files
    index()
    • This function should not return anything
    • The function will be responsible for indexing all the files
    addChildModule()
    • This function should not return anything
    • The function should take a Module as a parameter
    • The function will be responsible for adding child modules to the provided module
    getModuleDependencies()
    • This function should have a return type of Set<String>
    • The function should return Collections.emptySet() by default
    • The function will be used for getting the dependencies of the module
  • The last two functions will be implemented once the Project class has been created.

File location
Module: project
File: Module.kt