small cleanup

This commit is contained in:
Gabriel Pettier 2019-12-04 23:51:00 +01:00
parent 473b5e04d7
commit 363308d7a9
2 changed files with 0 additions and 14 deletions

View File

@ -1,4 +0,0 @@
#!/usr/bin/env sh
pip install .[dev]
pytest

View File

@ -198,9 +198,7 @@ def log_method(method, name, signature):
def autoclass(clsname):
jniname = clsname.replace('.', '/')
log.debug(jniname)
cls = MetaJavaClass.get_javaclass(jniname)
log.debug(cls)
if cls:
return cls
@ -212,14 +210,11 @@ def autoclass(clsname):
raise Exception('Java class {0} not found'.format(c))
return None
log.debug('found %s', repr(c))
constructors = []
for constructor in c.getConstructors():
sig = '({0})V'.format(
''.join([get_signature(x) for x in constructor.getParameterTypes()]))
constructors.append((sig, constructor.isVarArgs()))
log.debug('constructor: %s' % sig)
classDict['__javaconstructor__'] = constructors
cls = c
@ -228,11 +223,8 @@ def autoclass(clsname):
methods_name = [x.getName() for x in methods]
for index, method in enumerate(methods):
log.debug('method %s: %s', index, method)
name = methods_name[index]
log.debug('method name: %s', name)
if name in classDict:
log.debug('already known')
continue
# only one method available
@ -272,8 +264,6 @@ def autoclass(clsname):
else:
cls = _cls
log.debug('next parent class is %s', repr(cls))
def _getitem(self, index):
try:
return self.get(index)