test_class.declarator: directoryManager
test_class.modifier: private
test_class.original_string: private SourceDirectoryManager directoryManager;
test_class.type: SourceDirectoryManager
test_class.var_name: directoryManager
test_class.declarator: context = new CompilerContext()
test_class.modifier: private
test_class.original_string: private CompilerContext context = new CompilerContext();
test_class.type: CompilerContext
test_class.var_name: context
test_class.file: compiler/ballerina-lang/src/test/java/org/wso2/ballerinalang/compiler/SourceDirectoryManagerTest.java
test_class.identifier: SourceDirectoryManagerTest
test_case.body: @Test(description = "Test if module exist in the project")
      public void testIsModuleExists() {
          Project project = context.get(Project.PROJECT_KEY);
          Names names = Names.getInstance(context);
          PackageID expectedPackageId = new PackageID(names.fromString("abc"),
                  names.fromString("fruits"),
                  names.fromString("0.0.1"));
          Assert.assertTrue(project.isModuleExists(expectedPackageId));
          PackageID invalidName = new PackageID(names.fromString("abc"),
                  names.fromString("invalid"),
                  names.fromString("0.0.1"));
          Assert.assertFalse(project.isModuleExists(invalidName));
          PackageID invalidOrg = new PackageID(names.fromString("invalid"),
                  names.fromString("fruits"),
                  names.fromString("0.0.1"));
          Assert.assertFalse(project.isModuleExists(invalidOrg));
          PackageID invalidVersion = new PackageID(names.fromString("abc"),
                  names.fromString("fruits"),
                  names.fromString("0.1.1"));
          Assert.assertFalse(project.isModuleExists(invalidVersion));
      }
test_case.class_method_signature: SourceDirectoryManagerTest.testIsModuleExists()
test_case.full_signature: @Test(description = "Test if module exist in the project") public void testIsModuleExists()
test_case.identifier: testIsModuleExists
test_case.invocations: get getInstance fromString fromString fromString assertTrue isModuleExists fromString fromString fromString assertFalse isModuleExists fromString fromString fromString assertFalse isModuleExists fromString fromString fromString assertFalse isModuleExists
test_case.modifiers: @Test(description = "Test if module exist in the project") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsModuleExists()
focal_class.declarator: PROJECT_DIR_KEY =
              new CompilerContext.Key<>()
focal_class.modifier: private static final
focal_class.original_string: private static final CompilerContext.Key<SourceDirectoryManager> PROJECT_DIR_KEY =
              new CompilerContext.Key<>();
focal_class.type: CompilerContext.Key<SourceDirectoryManager>
focal_class.var_name: PROJECT_DIR_KEY
focal_class.declarator: options
focal_class.modifier: private final
focal_class.original_string: private final CompilerOptions options;
focal_class.type: CompilerOptions
focal_class.var_name: options
focal_class.declarator: names
focal_class.modifier: private final
focal_class.original_string: private final Names names;
focal_class.type: Names
focal_class.var_name: names
focal_class.declarator: sourceDirectory
focal_class.modifier: private final
focal_class.original_string: private final SourceDirectory sourceDirectory;
focal_class.type: SourceDirectory
focal_class.var_name: sourceDirectory
focal_class.declarator: manifest
focal_class.modifier: private
focal_class.original_string: private Manifest manifest;
focal_class.type: Manifest
focal_class.var_name: manifest
focal_class.file: compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/SourceDirectoryManager.java
focal_class.identifier: SourceDirectoryManager
focal_class.interfaces: implements Project
focal_class.class_method_signature: SourceDirectoryManager.getInstance(CompilerContext context)
focal_class.full_signature: public static SourceDirectoryManager getInstance(CompilerContext context)
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: (CompilerContext context)
focal_class.return: SourceDirectoryManager
focal_class.signature: SourceDirectoryManager getInstance(CompilerContext context)
focal_class.class_method_signature: SourceDirectoryManager.SourceDirectoryManager(CompilerContext context)
focal_class.full_signature: private  SourceDirectoryManager(CompilerContext context)
focal_class.identifier: SourceDirectoryManager
focal_class.modifiers: private
focal_class.parameters: (CompilerContext context)
focal_class.signature:  SourceDirectoryManager(CompilerContext context)
focal_class.class_method_signature: SourceDirectoryManager.listSourceFilesAndPackages()
focal_class.full_signature: public Stream<PackageID> listSourceFilesAndPackages()
focal_class.identifier: listSourceFilesAndPackages
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<PackageID>
focal_class.signature: Stream<PackageID> listSourceFilesAndPackages()
focal_class.class_method_signature: SourceDirectoryManager.getManifest()
focal_class.full_signature: private Manifest getManifest()
focal_class.identifier: getManifest
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Manifest
focal_class.signature: Manifest getManifest()
focal_class.class_method_signature: SourceDirectoryManager.getPackageID(String sourcePackage)
focal_class.full_signature: public PackageID getPackageID(String sourcePackage)
focal_class.identifier: getPackageID
focal_class.modifiers: public
focal_class.parameters: (String sourcePackage)
focal_class.return: PackageID
focal_class.signature: PackageID getPackageID(String sourcePackage)
focal_class.class_method_signature: SourceDirectoryManager.getSourceDirectory()
focal_class.full_signature: public SourceDirectory getSourceDirectory()
focal_class.identifier: getSourceDirectory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SourceDirectory
focal_class.signature: SourceDirectory getSourceDirectory()
focal_class.class_method_signature: SourceDirectoryManager.initializeAndGetSourceDirectory(CompilerContext context)
focal_class.full_signature: private SourceDirectory initializeAndGetSourceDirectory(CompilerContext context)
focal_class.identifier: initializeAndGetSourceDirectory
focal_class.modifiers: private
focal_class.parameters: (CompilerContext context)
focal_class.return: SourceDirectory
focal_class.signature: SourceDirectory initializeAndGetSourceDirectory(CompilerContext context)
focal_class.class_method_signature: SourceDirectoryManager.getOrgName(Manifest manifest)
focal_class.full_signature: private Name getOrgName(Manifest manifest)
focal_class.identifier: getOrgName
focal_class.modifiers: private
focal_class.parameters: (Manifest manifest)
focal_class.return: Name
focal_class.signature: Name getOrgName(Manifest manifest)
focal_class.class_method_signature: SourceDirectoryManager.checkIfSourcesExists(String pkg)
focal_class.full_signature:  boolean checkIfSourcesExists(String pkg)
focal_class.identifier: checkIfSourcesExists
focal_class.parameters: (String pkg)
focal_class.return: boolean
focal_class.signature: boolean checkIfSourcesExists(String pkg)
focal_class.class_method_signature: SourceDirectoryManager.isModuleExists(PackageID moduleId)
focal_class.full_signature: @Override public boolean isModuleExists(PackageID moduleId)
focal_class.identifier: isModuleExists
focal_class.modifiers: @Override public
focal_class.parameters: (PackageID moduleId)
focal_class.return: boolean
focal_class.signature: boolean isModuleExists(PackageID moduleId)
focal_class.class_method_signature: SourceDirectoryManager.getBaloPath(PackageID moduleId)
focal_class.full_signature: @Override public Path getBaloPath(PackageID moduleId)
focal_class.identifier: getBaloPath
focal_class.modifiers: @Override public
focal_class.parameters: (PackageID moduleId)
focal_class.return: Path
focal_class.signature: Path getBaloPath(PackageID moduleId)
focal_method.body: @Override
      public boolean isModuleExists(PackageID moduleId) {
          if (this.sourceDirectory.getSourcePackageNames().contains(moduleId.name.value) &&
              this.manifest.getProject().getOrgName().equals(moduleId.orgName.value) &&
              this.manifest.getProject().getVersion().equals(moduleId.version.value)) {
              return true;
          } else {
              return false;
          }
      }
focal_method.class_method_signature: SourceDirectoryManager.isModuleExists(PackageID moduleId)
focal_method.full_signature: @Override public boolean isModuleExists(PackageID moduleId)
focal_method.identifier: isModuleExists
focal_method.invocations: contains getSourcePackageNames equals getOrgName getProject equals getVersion getProject
focal_method.modifiers: @Override public
focal_method.parameters: (PackageID moduleId)
focal_method.return: boolean
focal_method.signature: boolean isModuleExists(PackageID moduleId)