java.lang.Object
io.qt.internal.QtJambiInternal
public final class QtJambiInternal extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
QtJambiInternal.Cleanable
static class
QtJambiInternal.InvocationInfo
static class
QtJambiInternal.LambdaInfo
static class
QtJambiInternal.Monitor
static class
QtJambiInternal.Ownership
static class
QtJambiInternal.RCList
static class
QtJambiInternal.RCMap
static class
QtJambiInternal.RCSet
-
Field Summary
Fields Modifier and Type Field Description protected static ThreadLocal<QtSignalEmitterInterface>
currentSender
static char
SignalPrefix
static char
SlotPrefix
-
Method Summary
Modifier and Type Method Description static void
addAllReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Collection<?> values)
static void
addReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object value)
static Boolean
areObjectsEquals(QtJambiObject object, Object other)
static QFlags<?>
asFlags(QtAbstractFlagEnumerator flag, Function<Integer,QFlags<?>> constructor)
static Supplier<Class<?>>
callerClassProvider()
static long
checkedNativeId(QtJambiObject object)
static long
checkedNativeId(QtObjectInterface object)
static void
clearReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic)
static void
connectSlotsByName(QObject object)
static int
countEventLoops(long thread)
static int
countEventLoops(QThread thread)
static void
countExpense(Class<?> cl, long cost, long limit)
static String
cppNormalizedSignature(String signalName)
static QByteArray
cppSignalSignature(QByteArray signal)
static String
cppSignalSignature(QMetaObject.AbstractSignal signal)
static String
cppSignalSignature(QtSignalEmitterInterface signalEmitter, String signalName)
static String
cppSlotSignature(Object receiver, String slot)
static String
cppSlotSignature(String slot)
static Object
createMetaType(int id, Class<?> javaType, Object copy)
static boolean
disconnect(QMetaObject.Connection connection)
static boolean
disconnectAll(QtSignalEmitterInterface sender, Object receiver)
Disconnect all connections made from the given object to a specific object.static void
disposedCheck(QtObjectInterface obj)
static void
disposeObject(QtJambiObject object)
static void
disposeObject(QtObjectInterface object)
static <V> V
fetchField(Object owner, Class<?> declaringClass, String fieldName, Class<V> fieldType)
static Class<?>
findGeneratedSuperclass(Class<?> clazz)
Returns the closest superclass ofobj's
class which is a generated class, or null if no such class is found.static void
findPlugins()
static void
findPlugins(String location)
static QMetaObject.AbstractSignal
findSignal(QtSignalEmitterInterface sender, String name, Class<?>... types)
static <T extends QtAbstractFlagEnumerator>
T[]flagConstants(QFlags<T> flags)
static MethodHandle
getConstructorHandle(Constructor<?> constructor)
static <T> Class<T>
getFactoryClass(QMetaObject.Method1<T,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method2<T,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method3<T,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method4<T,?,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method5<T,?,?,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method6<T,?,?,?,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method7<T,?,?,?,?,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method8<T,?,?,?,?,?,?,?,?> method)
static <T> Class<T>
getFactoryClass(QMetaObject.Method9<T,?,?,?,?,?,?,?,?,?> method)
static String
getInterfaceIID(Class<?> cls)
static MethodHandle
getMethodHandle(Method method)
static <R> Class<R>
getReturnType(QMetaObject.Method1<?,R> method)
static QMetaObject.DisposedSignal
getSignalOnDispose(QtObjectInterface object, boolean forceCreation)
Emitted either as the native resources that belong to the object are being cleaned up or directly before the object is finalized.static boolean
hasOwnerFunction(QtObjectInterface object)
static void
initializeInterface(QtObjectInterface iface)
static void
initializeNativeObject(QtObjectInterface object, Map<Class<?>,List<?>> arguments)
static boolean
initializePackage(Class<?> cls)
static boolean
initializePackage(Package pkg)
static boolean
initializePackage(String packagePath)
static String
internalNameOfArgumentType(Class<? extends Object> cls)
static void
invalidateObject(QtObject object)
static void
invalidateObject(QtObjectInterface object)
static IntFunction<QtJambiInternal.InvocationInfo>
invocationInfoProvider()
static Object
invokeMethod(Method method, Object object, Object... args)
static boolean
isAvailableLibrary(String library, String version)
static boolean
isAvailableQtLibrary(String library)
static boolean
isObjectDisposed(QtJambiObject object)
static boolean
isObjectDisposed(QtObjectInterface object)
static boolean
isQtPatched()
static boolean
isSharedPointer(QtObjectInterface object)
static boolean
isSignalType(Class<?> cl)
Returns true if the class cl represents a Signal.static boolean
isSmallEnum(QtAbstractFlagEnumerator enm)
static File
jambiTempDir()
static Class<?>
javaTypeForMetaTypeId(int metaTypeId)
static QObject
lambdaContext(Serializable slotObject)
static QtJambiInternal.LambdaInfo
lamdaInfo(Serializable slotObject)
static void
loadJambiLibrary(Class<?> callerClass, String library)
static void
loadLibrary(String lib)
static void
loadQtJambiLibrary(Class<?> callerClass, String library)
static void
loadQtLibrary(String library)
static void
loadUtilityLibrary(String library, String version)
static int
majorVersion()
static int
metaTypeId(Class<?> clazz)
static long
nativeId(QtJambiObject object)
Internal function which fetches the native id of the current object.static long
nativeId(QtObjectInterface object)
Internal function which fetches the native id of the current object.static int
nextMetaTypeId(Class<?> clazz)
static int
objectMetaTypeId(Object o)
static QObject
owner(QtObjectInterface object)
static QtJambiInternal.Ownership
ownership(QtObject object)
static QtJambiInternal.Ownership
ownership(QtObjectInterface object)
static void
putReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object key, Object value)
static Class<? extends QtObjectInterface>
qRegisteredPluginInterface(long iid)
static Class<? extends QtObjectInterface>
qRegisteredPluginInterface(QByteArray iid)
static void
qRegisterPluginInterface(Class<? extends QtObjectInterface> iface)
static void
qRegisterStaticPluginFunction(QObject instance, QJsonObject metaData)
static void
qRegisterStaticPluginFunction(Class<? extends QObject> pluginClass, QJsonObject metaData)
static QtJambiInternal.Cleanable
registerCleaner(Object obj, Runnable action)
static void
registerDependentObject(QtObjectInterface dependentObject, QtObject owner)
static void
registerDependentObject(QtObjectInterface dependentObject, QtObjectInterface owner)
static void
registerDependentObject(QtObject dependentObject, QtObject owner)
static void
registerDependentObject(QtObject dependentObject, QtObjectInterface owner)
static int
registerMetaType(Class<?> clazz)
static int
registerMetaType(Class<?> clazz, int[] instantiations)
static int
registerMetaType(Class<?> clazz, Type genericType, boolean isPointer, boolean isReference)
static void
removeFromCollectionReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic, Object value)
static void
removeFromMapReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic, Object value)
static <E extends Enum<E> & QtByteEnumerator>
EresolveEnum(Class<E> cl, byte value)
static <E extends Enum<E> & QtByteEnumerator>
EresolveEnum(Class<E> cl, byte value, String name)
static <E extends Enum<E> & QtEnumerator>
EresolveEnum(Class<E> cl, int value)
static <E extends Enum<E> & QtEnumerator>
EresolveEnum(Class<E> cl, int value, String name)
static <E extends Enum<E> & QtLongEnumerator>
EresolveEnum(Class<E> cl, long value)
static <E extends Enum<E> & QtLongEnumerator>
EresolveEnum(Class<E> cl, long value, String name)
static <E extends Enum<E> & QtShortEnumerator>
EresolveEnum(Class<E> cl, short value)
static <E extends Enum<E> & QtShortEnumerator>
EresolveEnum(Class<E> cl, short value, String name)
static SerializedLambda
serializeLambdaExpression(Serializable slotObject)
static void
setCppOwnership(QtObject object)
This is an internal function.static void
setCppOwnership(QtObjectInterface object)
This is an internal function.static void
setDefaultOwnership(QtObject object)
This is an internal function.static void
setDefaultOwnership(QtObjectInterface object)
This is an internal function.static void
setField(Object owner, Class<?> declaringClass, String fieldName, Object newValue)
static void
setJavaOwnership(QtObject object)
This is an internal function.static void
setJavaOwnership(QtObjectInterface object)
This is an internal function.static void
setReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean threadSafe, boolean isStatic, Object newValue)
static void
setReferenceCount(Thread owner, Class<? extends QThread> declaringClass, String fieldName, boolean threadSafe, boolean isStatic, Object newValue)
Deprecated.static void
shutdown()
static Class<?>
signalDeclaringClass(QMetaObject.AbstractSignal signal)
static QtJambiInternal.Monitor
synchronizedNativeId(QtObjectInterface object)
static boolean
tryIsObjectDisposed(QtObjectInterface object)
static void
unregisterDependentObject(QtObjectInterface dependentObject, QtObject owner)
static void
unregisterDependentObject(QtObjectInterface dependentObject, QtObjectInterface owner)
static void
unregisterDependentObject(QtObject dependentObject, QtObject owner)
static void
unregisterDependentObject(QtObject dependentObject, QtObjectInterface owner)
-
Field Details
-
SlotPrefix
public static final char SlotPrefix- See Also:
- Constant Field Values
-
SignalPrefix
public static final char SignalPrefix- See Also:
- Constant Field Values
-
currentSender
-
-
Method Details
-
shutdown
public static void shutdown() -
registerCleaner
-
serializeLambdaExpression
-
getConstructorHandle
public static MethodHandle getConstructorHandle(Constructor<?> constructor) throws IllegalAccessException- Throws:
IllegalAccessException
-
getMethodHandle
- Throws:
IllegalAccessException
-
invokeMethod
- Throws:
Throwable
-
isSignalType
Returns true if the class cl represents a Signal.- Parameters:
cl
- The class to check- Returns:
- True if the class is a signal
-
resolveEnum
public static <E extends Enum<E> & QtEnumerator> E resolveEnum(Class<E> cl, int value) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtEnumerator> E resolveEnum(Class<E> cl, int value, String name) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtByteEnumerator> E resolveEnum(Class<E> cl, byte value) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtByteEnumerator> E resolveEnum(Class<E> cl, byte value, String name) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtShortEnumerator> E resolveEnum(Class<E> cl, short value) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtShortEnumerator> E resolveEnum(Class<E> cl, short value, String name) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtLongEnumerator> E resolveEnum(Class<E> cl, long value) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
resolveEnum
public static <E extends Enum<E> & QtLongEnumerator> E resolveEnum(Class<E> cl, long value, String name) throws QNoSuchEnumValueException- Throws:
QNoSuchEnumValueException
-
countExpense
-
setReferenceCount
@Deprecated public static void setReferenceCount(Thread owner, Class<? extends QThread> declaringClass, String fieldName, boolean threadSafe, boolean isStatic, Object newValue)Deprecated. -
setReferenceCount
public static void setReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean threadSafe, boolean isStatic, Object newValue) -
setField
-
fetchField
-
clearReferenceCount
public static void clearReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic) -
addReferenceCount
public static void addReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object value) -
removeFromMapReferenceCount
public static void removeFromMapReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic, Object value) -
removeFromCollectionReferenceCount
public static void removeFromCollectionReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isStatic, Object value) -
addAllReferenceCount
public static void addAllReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Collection<?> values) -
putReferenceCount
public static void putReferenceCount(QtObjectInterface owner, Class<? extends QtObjectInterface> declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object key, Object value) -
connectSlotsByName
-
findGeneratedSuperclass
Returns the closest superclass ofobj's
class which is a generated class, or null if no such class is found. -
synchronizedNativeId
-
nativeId
Internal function which fetches the native id of the current object.- Returns:
- A long value which uniquely define the native resources held by this object during their life time.
-
checkedNativeId
-
checkedNativeId
-
nativeId
Internal function which fetches the native id of the current object.- Returns:
- A long value which uniquely define the native resources held by this object during their life time.
-
setCppOwnership
This is an internal function. Calling it can have unexpected results. Disables garbage collection for this object. This should be used when objects created in java are passed to C++ functions that take ownership of the objects. Both the Java and C++ part of the object will then be cleaned up by C++. -
setJavaOwnership
This is an internal function. Calling it can have unexpected results. Forces Java ownership of both the Java object and its C++ resources. The C++ resources will be cleaned up when the Java object is finalized. -
setDefaultOwnership
This is an internal function. Calling it can have unexpected results. Reenables garbage collection for this object. Should be used on objects for which disableGarbageCollection() has previously been called. After calling this function, the object ownership will be reset to default. -
setCppOwnership
This is an internal function. Calling it can have unexpected results. Disables garbage collection for this object. This should be used when objects created in java are passed to C++ functions that take ownership of the objects. Both the Java and C++ part of the object will then be cleaned up by C++. -
setJavaOwnership
This is an internal function. Calling it can have unexpected results. Forces Java ownership of both the Java object and its C++ resources. The C++ resources will be cleaned up when the Java object is finalized. -
setDefaultOwnership
This is an internal function. Calling it can have unexpected results. Reenables garbage collection for this object. Should be used on objects for which disableGarbageCollection() has previously been called. After calling this function, the object ownership will be reset to default. -
invalidateObject
-
invalidateObject
-
ownership
-
ownership
-
owner
-
hasOwnerFunction
-
getSignalOnDispose
public static QMetaObject.DisposedSignal getSignalOnDispose(QtObjectInterface object, boolean forceCreation)Emitted either as the native resources that belong to the object are being cleaned up or directly before the object is finalized. Connect to this signal to do clean up when the object is destroyed. The signal will never be emitted more than once per object, and the object is guaranteed to be unusable after this signal has returned. -
findSignal
public static QMetaObject.AbstractSignal findSignal(QtSignalEmitterInterface sender, String name, Class<?>... types) -
disconnectAll
Disconnect all connections made from the given object to a specific object.- Parameters:
sender
- The sender to disconnect from receiverreceiver
- The receiver to disconnect, or null to disconnect all receivers
-
disconnect
-
initializePackage
-
initializePackage
-
initializePackage
-
lamdaInfo
-
lambdaContext
-
disposedCheck
-
signalDeclaringClass
-
initializeInterface
-
disposeObject
-
isObjectDisposed
-
tryIsObjectDisposed
-
disposeObject
-
isObjectDisposed
-
areObjectsEquals
-
internalNameOfArgumentType
-
registerMetaType
-
registerMetaType
-
registerMetaType
-
metaTypeId
-
javaTypeForMetaTypeId
-
objectMetaTypeId
-
nextMetaTypeId
-
invocationInfoProvider
-
initializeNativeObject
public static void initializeNativeObject(QtObjectInterface object, Map<Class<?>,List<?>> arguments) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
isQtPatched
public static boolean isQtPatched() -
registerDependentObject
public static void registerDependentObject(QtObjectInterface dependentObject, QtObjectInterface owner) -
registerDependentObject
-
registerDependentObject
-
registerDependentObject
-
unregisterDependentObject
public static void unregisterDependentObject(QtObjectInterface dependentObject, QtObjectInterface owner) -
unregisterDependentObject
-
unregisterDependentObject
-
unregisterDependentObject
-
isSharedPointer
-
qRegisterPluginInterface
-
qRegisteredPluginInterface
-
qRegisteredPluginInterface
-
qRegisterStaticPluginFunction
-
qRegisterStaticPluginFunction
public static void qRegisterStaticPluginFunction(Class<? extends QObject> pluginClass, QJsonObject metaData) -
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
-
getFactoryClass
public static <T> Class<T> getFactoryClass(QMetaObject.Method9<T,?,?,?,?,?,?,?,?,?> method) -
getReturnType
-
findPlugins
-
findPlugins
public static void findPlugins() -
countEventLoops
-
countEventLoops
public static int countEventLoops(long thread) -
asFlags
public static QFlags<?> asFlags(QtAbstractFlagEnumerator flag, Function<Integer,QFlags<?>> constructor) -
isSmallEnum
-
flagConstants
-
callerClassProvider
-
getInterfaceIID
-
cppSlotSignature
-
cppSlotSignature
-
cppSignalSignature
-
cppSignalSignature
-
cppNormalizedSignature
-
cppSignalSignature
-
isAvailableQtLibrary
-
isAvailableLibrary
-
loadQtLibrary
-
loadUtilityLibrary
-
loadLibrary
-
jambiTempDir
-
loadQtJambiLibrary
-
loadJambiLibrary
-
majorVersion
public static int majorVersion() -
createMetaType
-