o
    !wi	                     @   s8   d dl Z dgZG dd deZG dd de jedZdS )    NJPackagec                   @   s   e Zd Zdd Zdd ZdS )_JPackageMetac                 C      t |tjS N)
isinstance_jpype	_JPackageselfother r   L/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/jpype/_jpackage.py__instancecheck__      z_JPackageMeta.__instancecheck__c                 C   r   r   )
issubclassr   r   r	   r   r   r   __subclasscheck__   r   z_JPackageMeta.__subclasscheck__N)__name__
__module____qualname__r   r   r   r   r   r   r      s    r   c                   @   s   e Zd ZdZdS )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   