File: //usr/lib/fm-agent/dependencies/linux/python3.9/jpype/__pycache__/_jpackage.cpython-39.pyc
a
��i � @ s8 d dl Z dgZG dd� de�ZG dd� de jed�ZdS )� N�JPackagec @ s e Zd Zdd� Zdd� ZdS )�
_JPackageMetac C s t |tj�S �N)�
isinstance�_jpype� _JPackage��self�other� r �A/usr/lib/fm-agent/dependencies/linux/python3.9/jpype/_jpackage.py�__instancecheck__ s z_JPackageMeta.__instancecheck__c C s t |tj�S r )�
issubclassr r r r r r �__subclasscheck__ s z_JPackageMeta.__subclasscheck__N)�__name__�
__module__�__qualname__r
r r r r r r s r c @ s e Zd ZdZdS )r a� Gateway for automatic importation of Java classes.
This class allows structured access to Java packages and classes.
This functionality has been replaced by ``jpype.imports``, but is still
useful in some cases.
Only the root of the package tree needs to be declared with the ``JPackage``
constructor. Sub-packages will be created on demand.
For example, to import the w3c DOM package:
.. code-block:: python
Document = JPackage('org').w3c.dom.Document
Under some situations such as a missing jar file, the resulting object
will be a JPackage object rather than the expected java class. This
results in rather challanging debugging messages. Due to this
restriction, the ``jpype.imports`` module is preferred. To prevent these
types of errors, a package can be declares as ``strict`` which prevents
expanding package names that do not comply with Java package name
conventions.
Args:
path (str): Path into the Java class tree.
Example:
.. code-block:: python
# Alias into a library
google = JPackage("com").google
# Access members in the library
result = google.common.IntMath.pow(x,m)
N)r r r �__doc__r r r r r s %)� metaclass)r �__all__�typer r r r r r r �<module> s