Class MissingJNIRegistrationError
- All Implemented Interfaces:
Serializable
The purpose of this exception is to easily discover unregistered elements and to assure that all JNI operations for registered elements have the expected behaviour.
Queries will succeed (or throw the expected error) if the element was registered for JNI access.
If that is not the case, a MissingJNIRegistrationError
will be thrown.
The exception thrown by the JNI query is a pending exception that needs to be explicitly checked by the calling native code. Examples:
Registration: "fields": [{"name": "registeredField"}, {"name":
"registeredNonexistentField"}]
GetFieldID(declaringClass, "registeredField")
will return the expected field.
GetFieldID(declaringClass, "registeredNonexistentField")
will throw a
NoSuchFieldError
.
GetFieldID(declaringClass, "unregisteredField")
will throw a
MissingJNIRegistrationError
.
GetFieldID(declaringClass, "unregisteredNonexistentField")
will throw a
MissingJNIRegistrationError
.
- Since:
- 24.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Method Details
-
getElementType
- Returns:
- The type of the element trying to be queried (
Class
,Method
,Field
orConstructor
). - Since:
- 23.0
-
getDeclaringClass
- Returns:
- The class on which the missing query was tried, or null on static queries.
- Since:
- 23.0
-
getElementName
- Returns:
- The name of the queried element.
- Since:
- 23.0
-
getSignature
- Returns:
- The signature passed to the query, or null if the query doesn't take a signature as argument.
- Since:
- 23.0
-