removed debug prints

This commit is contained in:
Jonas_Jones 2025-03-04 18:50:32 +01:00
parent 099fa87461
commit cd8b7e6218

View file

@ -60,7 +60,6 @@ def get_field_visibility(line):
field_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d]*)\s+(\w[\w\d]*)\s*(=\s*[^;]*)?;')
match = field_pattern.match(line.strip())
if match:
print(match.groups())
# Check for the access modifier in the line and return the corresponding symbol
split_line = line.split(" ")
if "public" in split_line:
@ -83,9 +82,7 @@ def is_line_method_declaration(line:str) -> bool:
:return: True if the line is a method declaration, False otherwise.
"""
method_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d]*)\s+(\w[\w\d]*)\s*\(.*\)\s*{')
print(line.strip())
match = method_pattern.match(line.strip())
print(match)
return match is not None
@ -230,7 +227,6 @@ def class_to_puml(filename:str) -> JavaClass:
if next_line_getter:
if is_line_field_declaration(javaline):
field_name = get_field_name_from_line(javaline)
print("FIELD NAME:", field_name)
class_methods[f"get{field_name.capitalize()}"] = get_field_visibility(javaline)
next_line_getter = False
elif is_line_method_declaration(javaline):
@ -250,7 +246,6 @@ def class_to_puml(filename:str) -> JavaClass:
importline_package_slug = javaline.strip().split(" ")[1].replace(";", "")
imported_classes[importline_package_slug.split(".")[-1]] = importline_package_slug
print(javaline)
if javaline.startswith("@"):
if "@Getter" in javaline and "@Setter" in javaline:
if not reached_class:
@ -272,7 +267,6 @@ def class_to_puml(filename:str) -> JavaClass:
elif " class " in javaline:
reached_class = True
elif is_line_field_declaration(javaline):
print(javaline)
visibility = get_field_visibility(javaline)
field_name = get_field_name_from_line(javaline)
class_fields[field_name] = visibility