コード例 #1
0
ファイル: handlers.py プロジェクト: barryyz/SikuliX-2014
def Handler(library, name, method):
    if RUN_KW_REGISTER.is_run_keyword(library.orig_name, name):
        return _RunKeywordHandler(library, name, method)
    if utils.is_java_method(method):
        return _JavaHandler(library, name, method)
    else:
        return _PythonHandler(library, name, method)
コード例 #2
0
def Handler(library, name, method):
    if RUN_KW_REGISTER.is_run_keyword(library.orig_name, name):
        return _RunKeywordHandler(library, name, method)
    if is_java_method(method):
        return _JavaHandler(library, name, method)
    else:
        return _PythonHandler(library, name, method)
コード例 #3
0
ファイル: testlibraries.py プロジェクト: urska19/Plone-test
 def _is_implicit_java_or_jython_method(self, handler):
     if not is_java_method(handler):
         return False
     for signature in handler.argslist[: handler.nargs]:
         cls = signature.declaringClass
         if not (cls is Object or self._is_created_by_jython(handler, cls)):
             return False
     return True
コード例 #4
0
 def _is_implicit_java_or_jython_method(self, handler):
     if not is_java_method(handler):
         return False
     for signature in handler.argslist[:handler.nargs]:
         cls = signature.declaringClass
         if not (cls is Object or self._is_created_by_jython(handler, cls)):
             return False
     return True
コード例 #5
0
 def _is_implicit_java_or_jython_method(self, handler):
     if not is_java_method(handler):
         return False
     for signature in handler.argslist[:handler.nargs]:
         cls = signature.declaringClass
         if not (cls is Object or cls.__module__ == 'org.python.proxies'):
             return False
     return True
コード例 #6
0
 def _is_implicit_java_or_jython_method(self, handler):
     if not is_java_method(handler):
         return False
     for signature in handler.argslist[:handler.nargs]:
         cls = signature.declaringClass
         if not (cls is Object or cls.__module__ == 'org.python.proxies'):
             return False
     return True
コード例 #7
0
ファイル: testlibraries.py プロジェクト: urska19/Plone-test
 def _is_routine(self, handler):
     return inspect.isroutine(handler) or is_java_method(handler)
コード例 #8
0
 def _is_routine(self, handler):
     return inspect.isroutine(handler) or is_java_method(handler)
 def supports_kwargs(self):
     if is_java_method(self.method):
         return self._supports_java_kwargs(self.method)
     return self._supports_python_kwargs(self.method)
コード例 #10
0
 def supports_kwargs(self):
     if is_java_method(self.method):
         return self._supports_java_kwargs(self.method)
     return self._supports_python_kwargs(self.method)