Initial commit
This commit is contained in:
12
pjvm/utils.py
Normal file
12
pjvm/utils.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from typing import List
|
||||
import re
|
||||
|
||||
|
||||
re_types = re.compile('([BCDFIJSZV]|L(?:[a-zA-Z0-9_]+/)+[a-zA-Z0-9_]+;)')
|
||||
|
||||
re_method_sig = re.compile(fr"\(({re_types.pattern}*)\){re_types.pattern}")
|
||||
|
||||
|
||||
def get_argument_count_types_descriptor(descriptor: str) -> List[str]:
|
||||
args = re_method_sig.search(descriptor).group(1)
|
||||
return re_types.findall(args)
|
||||
Reference in New Issue
Block a user