File: //lib/fm-agent/dependencies/linux/python3.9/jpype/__pycache__/_jclass.cpython-39.pyc
a
��i� � @ s� d dl Z ddlmZ ddlmZ g d�Zdd� ZG dd � d e�ZG d
d� de j ed�Z
G d
d� de jdd�Zdd� Z
dd� Zdd� Ze
e _
ee _ee _e
e _
ee _dS )� N� )�pysafe)�_jcustomizer)�JClass�
JInterface� JOverridec sB t | �dkr2t| d �r2t�| d di � | d S � fdd�}|S )a� Annotation to denote a method as overriding a Java method.
This annotation applies to customizers, proxies, and extensions
to Java classes. Apply it to methods to mark them as implementing
or overriding Java methods. Keyword arguments are passed to the
corresponding implementation factory.
Args:
sticky=bool: Applies a customizer method to all derived classes.
r r �
__joverride__c s t �| d� � | S )Nr )�object�__setattr__)�method��kwargs� �?/usr/lib/fm-agent/dependencies/linux/python3.9/jpype/_jclass.py�modifier+ s zJOverride.<locals>.modifier)�len�callabler r
)�argsr
r r r r r s
r c @ s e Zd Zdd� ZdS )�
JClassMetac C s t |�tjkS �N)�type�_jpype�_JClass)�self�otherr r r �__instancecheck__2 s zJClassMeta.__instancecheck__N)�__name__�
__module__�__qualname__r r r r r r 1 s r c @ s e Zd ZdZddd�ZdS )r a� Meta class for all Java class instances.
When called as an object, JClass will contruct a new Java class wrapper.
All Python wrappers for Java classes derive from this type.
To test if a Python class is a Java wrapper use
``isinstance(obj, jpype.JClass)``.
Args:
className (str): name of a Java type.
Keyword Args:
loader (java.lang.ClassLoader): specifies a class loader to use
when creating a class.
initialize (bool): If true the class will be loaded and initialized.
Otherwise, static members will be uninitialized.
Returns:
JavaClass: a new wrapper for a Java class
Raises:
TypeError: if the component class is invalid or could not be found.
NTc C s� |rt |t�rtj�|||�}t |t�r�|�d�r�|�d�}||d d� }t�|d |� �}t|j �
� �}|dkr�td|j ��t|�dkr�|�
d�}t|�dkr�t|�t|j �
� �kr�td|j ��|S t�|�S ) N�>�<r ���r z(Java class '%s' does not take parameters�,z'Java generic class '%s' length mismatch)�
isinstance�strr �_java_lang_ClassZforName�endswith�find� _getClassr �class_ZgetTypeParameters� TypeErrorr �split)�clsZjc�loaderZ
initialize�i�params�retZacceptParamsr r r �__new__N s&