Skip to content

Commit 79ac9e4

Browse files
committed
Work on probe API
1 parent 8fba404 commit 79ac9e4

40 files changed

+250
-65
lines changed

jpype/_core.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from pathlib import Path
2323
import sys
2424
import typing
25+
import weakref
2526

2627
import _jpype
2728
from . import types as _jtypes
@@ -600,3 +601,14 @@ def removeShutdownHook(self, thread):
600601

601602

602603
_jpype.JVMNotRunning = JVMNotRunning
604+
605+
# Dictionary of Python types to Java Interfaces
606+
_jpype._bridge_concrete = {}
607+
# Dictionary of String to Java Interfaces
608+
_jpype._bridge_protocol = {}
609+
# Dictionary of Type to Tuple(Interface[], Dict)
610+
_jpype._bridge_cache = weakref.WeakKeyDictionary()
611+
# Dictionary of Tuple(Interface[]) to Tuple(Interface[])
612+
_jpype._bridge_interfaces = {}
613+
# Dictionary of Tuple(Interface[]) to Dict
614+
_jpype._bridge_methods = {}

native/jpype_module/src/main/java/python/exception/PyADirectionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyADirectionError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyArithmeticError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyArithmeticError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyAssertionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyAssertionError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyAttributeError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyAttributeError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyBlockingIOError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyBlockingIOError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyBufferError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyBufferError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyChildProcessError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyChildProcessError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyConnectionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyConnectionError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyEOFError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyEOFError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyExc.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

native/jpype_module/src/main/java/python/exception/PyException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package python.exception;
1717

1818
import java.util.HashMap;
19+
import python.lang.PyExc;
1920

2021
/**
2122
*

native/jpype_module/src/main/java/python/exception/PyFileExistsError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyFileExistsError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyFileNotFoundError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyFileNotFoundError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyFloatingPointError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyFloatingPointError extends PyArithmeticError
46
{
57

native/jpype_module/src/main/java/python/exception/PyImportError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyImportError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyIndentationError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyIndentationError extends PySyntaxError
46
{
57

native/jpype_module/src/main/java/python/exception/PyIndexError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyIndexError extends PyLookupError
46
{
57

native/jpype_module/src/main/java/python/exception/PyInterruptedError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyInterruptedError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyKeyError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyKeyError extends PyLookupError
46
{
57

native/jpype_module/src/main/java/python/exception/PyLookupError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyLookupError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyModuleNotFoundError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyModuleNotFoundError extends PyImportError
46
{
57

native/jpype_module/src/main/java/python/exception/PyNameError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyNameError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyNotADirectoryError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyNotADirectoryError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyNotImplementedError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyNotImplementedError extends PyRuntimeError
46
{
57

native/jpype_module/src/main/java/python/exception/PyOSError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyOSError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyOverflowError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyOverflowError extends PyArithmeticError
46
{
57

native/jpype_module/src/main/java/python/exception/PyPermissionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyPermissionError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyProcessLookupError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyProcessLookupError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyRecursionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyRecursionError extends PyRuntimeError
46
{
57

native/jpype_module/src/main/java/python/exception/PyReferenceError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyReferenceError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyRuntimeError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyRuntimeError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PySyntaxError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PySyntaxError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PySystemError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PySystemError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyTimeoutError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyTimeoutError extends PyOSError
46
{
57

native/jpype_module/src/main/java/python/exception/PyTypeError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyTypeError extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyWarning.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyWarning extends PyException
46
{
57

native/jpype_module/src/main/java/python/exception/PyZeroDivisionError.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package python.exception;
22

3+
import python.lang.PyExc;
4+
35
public class PyZeroDivisionError extends PyArithmeticError
46
{
57

0 commit comments

Comments
 (0)