Beispiel #1
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if self.package_identifier == ctx.qualifiedName().getText():
         self.in_selected_package = True
         print("Package " + self.package_identifier + " Found")
Beispiel #2
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if self.package_name == ctx.qualifiedName().getText():
         self.in_selected_package = True
     else:
         self.in_selected_package = False
Beispiel #3
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if ctx.qualifiedName() and not self.package_name:
         self.package_name = ctx.qualifiedName().getText()
         self.code += f"package {self.package_name};{self.NEW_LINE}"
Beispiel #4
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if self.package_name == ctx.qualifiedName().getText():
         self.has_access_to_class = True
Beispiel #5
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     self.interface_info['package'] = ctx.qualifiedName().getText()
Beispiel #6
0
 def enterPackageDeclaration(self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if ctx.qualifiedName().IDENTIFIER()[-1].getText() not in packages:
         packages.append(ctx.qualifiedName().IDENTIFIER()[-1].getText())
         print("package", ctx.qualifiedName().IDENTIFIER()[-1].getText(), "added to list")
Beispiel #7
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     self.current_package = ctx.qualifiedName().getText()
Beispiel #8
0
 def enterPackageDeclaration(
         self, ctx: JavaParserLabeled.PackageDeclarationContext):
     if self.target_package is None or is_equivalent(
             ctx.qualifiedName().getText(), self.target_package):
         self.is_in_target_package = True