File: //lib/fm-agent/dependencies/linux/python3.9/jpype/__pycache__/_jobject.cpython-39.pyc
a
��i � @ s@ d dl Z dgZG dd� de jdd�Zdd� Zd
dd �Zee _dS )� N�JObjectc @ s e Zd ZdZdd� ZdS )r a� Base class for all object instances.
It can be used to test if an object is a Java object instance with
``isinstance(obj, JObject)``.
Calling ``JObject`` as a function can be used to covert or cast to
specific Java type. It will box primitive types and supports an
option type to box to.
This wrapper functions in three ways.
- If the no type is given the object is automatically
cast to type best matched given the value. This can be used
to create a boxed primitive. ``JObject(JInt(i))``
- If the type is a primitve, the object will be the boxed type of that
primitive. ``JObject(1, JInt)``
- If the type is a Java class and the value is a Java object, the
object will be cast to the Java class and will be an exact match to
the class for the purposes of matching arguments. If the object
is not compatible, an exception will be raised.
Args:
value: The value to be cast into an Java object.
type(Optional, type): The type to cast into.
Raises:
TypeError: If the object cannot be cast to the specified type, or
the requested type is not a Java class or primitive.
c O s"