fixed is_line_method_declaration for interfaces
This commit is contained in:
parent
5e74e9f1ff
commit
e3e29ca1ba
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ def is_line_method_declaration(line:str, class_type:str) -> bool:
|
|||
method_pattern = re.compile(r'^\s*(public|private|protected|\s)*\s*(static|final|\s)*\s*(\w[\w\d]*)\s+(\w[\w\d]*)\s*\(.*\)\s*(?:throws\s+\w[\w\d]*)?\s*{')
|
||||
|
||||
if class_type == "interface":
|
||||
method_pattern = re.compile(r'^\w\w*\s+\w\w*\(\)\s*(?:throws\s+\w[\w\d]*)?\s*;$')
|
||||
method_pattern = re.compile(r'^\s*(public|private|protected|\s)*(\w[\w\d,<>\s]*)\s+\w\w*\((\w[\w\d,<>\s]*)\s*\w*\)\s*(?:throws\s+\w[\w\d]*)?\s*;$')
|
||||
|
||||
match = method_pattern.match(line.strip())
|
||||
return match is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue