mirror of
https://github.com/HighCapable/YukiReflection.git
synced 2025-09-08 19:44:17 +08:00
119 lines
64 KiB
HTML
119 lines
64 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-US">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<meta name="generator" content="VuePress 2.0.0-beta.51">
|
||
<style>
|
||
:root {
|
||
--c-bg: #fff;
|
||
}
|
||
html.dark {
|
||
--c-bg: #22272e;
|
||
}
|
||
html, body {
|
||
background-color: var(--c-bg);
|
||
}
|
||
</style>
|
||
<script>
|
||
const userMode = localStorage.getItem('vuepress-color-scheme');
|
||
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
|
||
document.documentElement.classList.toggle('dark', true);
|
||
}
|
||
</script>
|
||
<link rel="icon" href="/YukiReflection/images/logo.png"><title>API Exception Handling | Yuki Reflection</title><meta name="description" content="An efficient Reflection API for the Android platform built in Kotlin">
|
||
<link rel="modulepreload" href="/YukiReflection/assets/app.3cb5b3a5.js"><link rel="modulepreload" href="/YukiReflection/assets/api-exception.html.bcc6510b.js"><link rel="modulepreload" href="/YukiReflection/assets/api-exception.html.58702900.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.7c46b7b0.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.52fbcda7.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.1356aa63.js"><link rel="prefetch" href="/YukiReflection/assets/about.html.2effd4b1.js"><link rel="prefetch" href="/YukiReflection/assets/changelog.html.01288623.js"><link rel="prefetch" href="/YukiReflection/assets/contacts.html.96dbd22d.js"><link rel="prefetch" href="/YukiReflection/assets/future.html.aa0c285e.js"><link rel="prefetch" href="/YukiReflection/assets/features.html.360a180c.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.817a2e55.js"><link rel="prefetch" href="/YukiReflection/assets/api-example.html.6daf2d5c.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.89a39f8e.js"><link rel="prefetch" href="/YukiReflection/assets/quick-start.html.fb6e2746.js"><link rel="prefetch" href="/YukiReflection/assets/about.html.b758f732.js"><link rel="prefetch" href="/YukiReflection/assets/changelog.html.eb0b25c0.js"><link rel="prefetch" href="/YukiReflection/assets/contacts.html.f15acc18.js"><link rel="prefetch" href="/YukiReflection/assets/future.html.a5999f89.js"><link rel="prefetch" href="/YukiReflection/assets/features.html.57dae594.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.a2b832f6.js"><link rel="prefetch" href="/YukiReflection/assets/api-example.html.90859470.js"><link rel="prefetch" href="/YukiReflection/assets/api-exception.html.6f5a5377.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.77f6fdb1.js"><link rel="prefetch" href="/YukiReflection/assets/quick-start.html.49d48274.js"><link rel="prefetch" href="/YukiReflection/assets/YukiReflection.html.071d5ea0.js"><link rel="prefetch" href="/YukiReflection/assets/YukiReflection.html.787cb57f.js"><link rel="prefetch" href="/YukiReflection/assets/CurrentClass.html.4fb3c7c5.js"><link rel="prefetch" href="/YukiReflection/assets/GenericClass.html.18ef844b.js"><link rel="prefetch" href="/YukiReflection/assets/VariousClass.html.be531e78.js"><link rel="prefetch" href="/YukiReflection/assets/ReflectionFactory.html.660311db.js"><link rel="prefetch" href="/YukiReflection/assets/ReflectionFactory.html.79e3b099.js"><link rel="prefetch" href="/YukiReflection/assets/DefinedTypeFactory.html.b02e4f3c.js"><link rel="prefetch" href="/YukiReflection/assets/ComponentTypeFactory.html.90290523.js"><link rel="prefetch" href="/YukiReflection/assets/GraphicsTypeFactory.html.c8903b11.js"><link rel="prefetch" href="/YukiReflection/assets/ViewTypeFactory.html.b4b99faf.js"><link rel="prefetch" href="/YukiReflection/assets/VariableTypeFactory.html.271d7de9.js"><link rel="prefetch" href="/YukiReflection/assets/CurrentClass.html.1f324cf5.js"><link rel="prefetch" href="/YukiReflection/assets/GenericClass.html.80c441b8.js"><link rel="prefetch" href="/YukiReflection/assets/VariousClass.html.7a95c6f9.js"><link rel="prefetch" href="/YukiReflection/assets/DexClassFinder.html.7f9c18ee.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorFinder.html.91c23734.js"><link rel="prefetch" href="/YukiReflection/assets/FieldFinder.html.d5dcfef4.js"><link rel="prefetch" href="/YukiReflection/assets/MethodFinder.html.704be21f.js"><link rel="prefetch" href="/YukiReflection/assets/BaseFinder.html.fb47fda7.js"><link rel="prefetch" href="/YukiReflection/assets/VariableTypeFactory.html.a7e09e1f.js"><link rel="prefetch" href="/YukiReflection/assets/DefinedTypeFactory.html.5311d687.js"><link rel="prefetch" href="/YukiReflection/assets/ComponentTypeFactory.html.23cb1ea0.js"><link rel="prefetch" href="/YukiReflection/assets/GraphicsTypeFactory.html.ede0ac1a.js"><link rel="prefetch" href="/YukiReflection/assets/ViewTypeFactory.html.8faf3b20.js"><link rel="prefetch" href="/YukiReflection/assets/BaseFinder.html.69bb751c.js"><link rel="prefetch" href="/YukiReflection/assets/DexClassFinder.html.e0965adb.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorFinder.html.372473c1.js"><link rel="prefetch" href="/YukiReflection/assets/FieldFinder.html.71816419.js"><link rel="prefetch" href="/YukiReflection/assets/MethodFinder.html.3e0643fa.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorRules.html.7769fbd0.js"><link rel="prefetch" href="/YukiReflection/assets/FieldRules.html.cc84b291.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRules.html.2d5c89a4.js"><link rel="prefetch" href="/YukiReflection/assets/MethodRules.html.46e12f82.js"><link rel="prefetch" href="/YukiReflection/assets/CountRules.html.aa55eac0.js"><link rel="prefetch" href="/YukiReflection/assets/ModifierRules.html.bf55a30e.js"><link rel="prefetch" href="/YukiReflection/assets/NameRules.html.2124d233.js"><link rel="prefetch" href="/YukiReflection/assets/ObjectRules.html.0a6223eb.js"><link rel="prefetch" href="/YukiReflection/assets/CountRules.html.69b807a7.js"><link rel="prefetch" href="/YukiReflection/assets/ModifierRules.html.063cc2f9.js"><link rel="prefetch" href="/YukiReflection/assets/NameRules.html.538d5551.js"><link rel="prefetch" href="/YukiReflection/assets/ObjectRules.html.ec943416.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorRules.html.ed54d54f.js"><link rel="prefetch" href="/YukiReflection/assets/FieldRules.html.0a9d082d.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRules.html.94fb57e3.js"><link rel="prefetch" href="/YukiReflection/assets/MethodRules.html.c94c00ea.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRulesResult.html.0df424dd.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRulesResult.html.aa74ca3c.js"><link rel="prefetch" href="/YukiReflection/assets/404.html.c038a05a.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.cdd3cd27.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.a0c6cad9.js"><link rel="prefetch" href="/YukiReflection/assets/index.html.f2ed3843.js"><link rel="prefetch" href="/YukiReflection/assets/about.html.8e88f1c3.js"><link rel="prefetch" href="/YukiReflection/assets/changelog.html.ab4084af.js"><link rel="prefetch" href="/YukiReflection/assets/contacts.html.1225422c.js"><link rel="prefetch" href="/YukiReflection/assets/future.html.82378e9b.js"><link rel="prefetch" href="/YukiReflection/assets/features.html.8d011c3c.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.04faba46.js"><link rel="prefetch" href="/YukiReflection/assets/api-example.html.59051e7e.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.81e1e5ee.js"><link rel="prefetch" href="/YukiReflection/assets/quick-start.html.c524d8d1.js"><link rel="prefetch" href="/YukiReflection/assets/about.html.98e35d05.js"><link rel="prefetch" href="/YukiReflection/assets/changelog.html.fe56bfab.js"><link rel="prefetch" href="/YukiReflection/assets/contacts.html.8541ae79.js"><link rel="prefetch" href="/YukiReflection/assets/future.html.35497830.js"><link rel="prefetch" href="/YukiReflection/assets/features.html.fb2cff19.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.88a0631d.js"><link rel="prefetch" href="/YukiReflection/assets/api-example.html.450e2b7a.js"><link rel="prefetch" href="/YukiReflection/assets/api-exception.html.553960af.js"><link rel="prefetch" href="/YukiReflection/assets/home.html.87f49377.js"><link rel="prefetch" href="/YukiReflection/assets/quick-start.html.a8e6b073.js"><link rel="prefetch" href="/YukiReflection/assets/YukiReflection.html.3e0e5f98.js"><link rel="prefetch" href="/YukiReflection/assets/YukiReflection.html.6e8dfdd7.js"><link rel="prefetch" href="/YukiReflection/assets/CurrentClass.html.dc7279bd.js"><link rel="prefetch" href="/YukiReflection/assets/GenericClass.html.c797cc44.js"><link rel="prefetch" href="/YukiReflection/assets/VariousClass.html.9c666bf7.js"><link rel="prefetch" href="/YukiReflection/assets/ReflectionFactory.html.5be08357.js"><link rel="prefetch" href="/YukiReflection/assets/ReflectionFactory.html.a5559e9c.js"><link rel="prefetch" href="/YukiReflection/assets/DefinedTypeFactory.html.e642fe17.js"><link rel="prefetch" href="/YukiReflection/assets/ComponentTypeFactory.html.f040e23c.js"><link rel="prefetch" href="/YukiReflection/assets/GraphicsTypeFactory.html.2797253a.js"><link rel="prefetch" href="/YukiReflection/assets/ViewTypeFactory.html.9228d573.js"><link rel="prefetch" href="/YukiReflection/assets/VariableTypeFactory.html.0a0df340.js"><link rel="prefetch" href="/YukiReflection/assets/CurrentClass.html.a39c7c61.js"><link rel="prefetch" href="/YukiReflection/assets/GenericClass.html.ffdaf568.js"><link rel="prefetch" href="/YukiReflection/assets/VariousClass.html.36a38dcc.js"><link rel="prefetch" href="/YukiReflection/assets/DexClassFinder.html.f5efad4e.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorFinder.html.e59ecc69.js"><link rel="prefetch" href="/YukiReflection/assets/FieldFinder.html.b7011031.js"><link rel="prefetch" href="/YukiReflection/assets/MethodFinder.html.342c1fd7.js"><link rel="prefetch" href="/YukiReflection/assets/BaseFinder.html.812a050e.js"><link rel="prefetch" href="/YukiReflection/assets/VariableTypeFactory.html.7e8b800c.js"><link rel="prefetch" href="/YukiReflection/assets/DefinedTypeFactory.html.d798048a.js"><link rel="prefetch" href="/YukiReflection/assets/ComponentTypeFactory.html.7505e647.js"><link rel="prefetch" href="/YukiReflection/assets/GraphicsTypeFactory.html.8252c601.js"><link rel="prefetch" href="/YukiReflection/assets/ViewTypeFactory.html.2a07dc33.js"><link rel="prefetch" href="/YukiReflection/assets/BaseFinder.html.27357ff0.js"><link rel="prefetch" href="/YukiReflection/assets/DexClassFinder.html.d909f71f.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorFinder.html.15fe4612.js"><link rel="prefetch" href="/YukiReflection/assets/FieldFinder.html.c4ba046b.js"><link rel="prefetch" href="/YukiReflection/assets/MethodFinder.html.f92accf7.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorRules.html.d4ec4eae.js"><link rel="prefetch" href="/YukiReflection/assets/FieldRules.html.1bdd4f30.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRules.html.fd884aa2.js"><link rel="prefetch" href="/YukiReflection/assets/MethodRules.html.674801b6.js"><link rel="prefetch" href="/YukiReflection/assets/CountRules.html.0900393b.js"><link rel="prefetch" href="/YukiReflection/assets/ModifierRules.html.bd1880fe.js"><link rel="prefetch" href="/YukiReflection/assets/NameRules.html.35dc70b7.js"><link rel="prefetch" href="/YukiReflection/assets/ObjectRules.html.5e653f63.js"><link rel="prefetch" href="/YukiReflection/assets/CountRules.html.7bb05538.js"><link rel="prefetch" href="/YukiReflection/assets/ModifierRules.html.3bcf8e79.js"><link rel="prefetch" href="/YukiReflection/assets/NameRules.html.b078a177.js"><link rel="prefetch" href="/YukiReflection/assets/ObjectRules.html.faf0320c.js"><link rel="prefetch" href="/YukiReflection/assets/ConstructorRules.html.f10ebc65.js"><link rel="prefetch" href="/YukiReflection/assets/FieldRules.html.e23b2343.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRules.html.854655e5.js"><link rel="prefetch" href="/YukiReflection/assets/MethodRules.html.4f7471cd.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRulesResult.html.3eaa80e8.js"><link rel="prefetch" href="/YukiReflection/assets/MemberRulesResult.html.68563fb1.js"><link rel="prefetch" href="/YukiReflection/assets/404.html.5d5f90c0.js">
|
||
<link rel="stylesheet" href="/YukiReflection/assets/style.7c106af9.css">
|
||
</head>
|
||
<body>
|
||
<div id="app"><!--[--><div class="theme-container hidden-anchor-page"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/YukiReflection/en/" class=""><img class="logo" src="/YukiReflection/images/logo.png" alt="Yuki Reflection"><span class="site-name can-hide">Yuki Reflection</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/guide/home" class="" aria-label="Introduce"><!--[--><!--]--> Introduce <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/guide/quick-start" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/config/api-example" class="" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/config/api-exception" class="router-link-active" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API Document</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/home" class="" aria-label="Document Introduction"><!--[--><!--]--> Document Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/YukiReflection" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/features" class="" aria-label="Features"><!--[--><!--]--> Features <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/changelog" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/future" class="" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/about" class="" aria-label="About this Document"><!--[--><!--]--> About this Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiReflection/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiReflection/en/config/api-exception.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/YukiReflection/zh-cn/config/api-exception.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/fankes/YukiReflection" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><form class="search-box" role="search"><input type="search" placeholder="Search" autocomplete="off" spellcheck="false" value><!----></form></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Navigation"><span class="title">Navigation</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Get Started</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/guide/home" class="" aria-label="Introduce"><!--[--><!--]--> Introduce <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/guide/quick-start" class="" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>Configs</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/config/api-example" class="" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/config/api-exception" class="router-link-active" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API Document</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/home" class="" aria-label="Document Introduction"><!--[--><!--]--> Document Introduction <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/YukiReflection" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/api/features" class="" aria-label="Features"><!--[--><!--]--> Features <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>About</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/changelog" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/future" class="" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiReflection/en/about/about" class="" aria-label="About this Document"><!--[--><!--]--> About this Document <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiReflection/en/about/contacts" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">English (US)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiReflection/en/config/api-exception.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/YukiReflection/zh-cn/config/api-exception.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/fankes/YukiReflection" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">Get Started <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/guide/home.html" class="sidebar-item" aria-label="Introduce"><!--[--><!--]--> Introduce <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/guide/quick-start.html" class="sidebar-item" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading active collapsible">Configs <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/config/api-example.html" class="sidebar-item" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiReflection/en/config/api-exception.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiReflection/en/config/api-exception.html#non-blocking-exceptions" class="router-link-active router-link-exact-active sidebar-item" aria-label="Non-Blocking Exceptions"><!--[--><!--]--> Non-Blocking Exceptions <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiReflection/en/config/api-exception.html#blocking-exceptions" class="router-link-active router-link-exact-active sidebar-item" aria-label="Blocking Exceptions"><!--[--><!--]--> Blocking Exceptions <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">API Document <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/api/home.html" class="sidebar-item" aria-label="Document Introduce"><!--[--><!--]--> Document Introduce <!--[--><!--]--></a><!----></li><li><p tabindex="0" class="sidebar-item collapsible">Public API <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/YukiReflection.html" class="sidebar-item" aria-label="YukiReflection - object"><!--[--><!--]--> YukiReflection - object <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html" class="sidebar-item" aria-label="ComponentTypeFactory - kt"><!--[--><!--]--> ComponentTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html" class="sidebar-item" aria-label="GraphicsTypeFactory - kt"><!--[--><!--]--> GraphicsTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html" class="sidebar-item" aria-label="ViewTypeFactory - kt"><!--[--><!--]--> ViewTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html" class="sidebar-item" aria-label="VariableTypeFactory - kt"><!--[--><!--]--> VariableTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html" class="sidebar-item" aria-label="DefinedTypeFactory - kt"><!--[--><!--]--> DefinedTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html" class="sidebar-item" aria-label="ReflectionFactory - kt"><!--[--><!--]--> ReflectionFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html" class="sidebar-item" aria-label="MethodFinder - class"><!--[--><!--]--> MethodFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html" class="sidebar-item" aria-label="ConstructorFinder - class"><!--[--><!--]--> ConstructorFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html" class="sidebar-item" aria-label="FieldFinder - class"><!--[--><!--]--> FieldFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html" class="sidebar-item" aria-label="DexClassFinder - class"><!--[--><!--]--> DexClassFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html" class="sidebar-item" aria-label="MemberRulesResult - class"><!--[--><!--]--> MemberRulesResult - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html" class="sidebar-item" aria-label="MemberRules - class"><!--[--><!--]--> MemberRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html" class="sidebar-item" aria-label="FieldRules - class"><!--[--><!--]--> FieldRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html" class="sidebar-item" aria-label="MethodRules - class"><!--[--><!--]--> MethodRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html" class="sidebar-item" aria-label="ConstructorRules - class"><!--[--><!--]--> ConstructorRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html" class="sidebar-item" aria-label="BaseFinder - class"><!--[--><!--]--> BaseFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html" class="sidebar-item" aria-label="CountRules - class"><!--[--><!--]--> CountRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html" class="sidebar-item" aria-label="ModifierRules - class"><!--[--><!--]--> ModifierRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html" class="sidebar-item" aria-label="NameRules - class"><!--[--><!--]--> NameRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html" class="sidebar-item" aria-label="ObjectRules - class"><!--[--><!--]--> ObjectRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html" class="sidebar-item" aria-label="VariousClass - class"><!--[--><!--]--> VariousClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html" class="sidebar-item" aria-label="CurrentClass - class"><!--[--><!--]--> CurrentClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html" class="sidebar-item" aria-label="GenericClass - class"><!--[--><!--]--> GenericClass - class <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a href="/YukiReflection/en/api/features.html" class="sidebar-item" aria-label="Features"><!--[--><!--]--> Features <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">About <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/about/changelog.html" class="sidebar-item" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/about/future.html" class="sidebar-item" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/about/contacts.html" class="sidebar-item" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a><!----></li><li><a href="/YukiReflection/en/about/about.html" class="sidebar-item" aria-label="About this Document"><!--[--><!--]--> About this Document <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="api-exception-handling" tabindex="-1"><a class="header-anchor" href="#api-exception-handling" aria-hidden="true">#</a> API Exception Handling</h1><blockquote><p>Exceptions are the main problems often encountered in the development process. Here are some common exceptions that may be encountered during the use of <code>YukiReflection</code> and how to deal with them.</p></blockquote><p>The exception description here will only synchronize the latest API version, and the exception of the older API version will not be described again, please always keep the API version up-to-date.</p><h2 id="non-blocking-exceptions" tabindex="-1"><a class="header-anchor" href="#non-blocking-exceptions" aria-hidden="true">#</a> Non-Blocking Exceptions</h2><blockquote><p>These exceptions will not cause the app to stop running (FC), but will print <code>E</code> level logs on the console, and may also stop continuing to execute related functions.</p></blockquote><h6 id="exception" tabindex="-1"><a class="header-anchor" href="#exception" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Method/Constructor/Field match type "<strong>TYPE</strong>" not allowed</p></div><p><strong>Abnormal</strong></p><p>A disallowed parameter type was set when looking up methods, constructors, and variables.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// Find a method</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ❗ Invalid type example is set</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#6CB6FF;">false</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">1</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">0</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ❗ Invalid type example is set</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">false</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#768390;">// Find a variable</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">field {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ❗ Invalid type example is set</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">false</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>In the search, <code>param</code>, <code>returnType</code>, <code>type</code> only accept <code>Class</code>, <code>String</code>, <code>VariousClass</code> types, and parameter instances cannot be passed in.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// Find a method</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ✅ Examples of correct usage</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">BooleanType</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">IntType</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">IntType</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ✅ Examples of correct usage</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BooleanType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ✅ The following scheme is also correct</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"java.lang.Boolean"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#768390;">// Find a variable</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">field {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ✅ Examples of correct usage</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BooleanType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h6 id="exception-1" tabindex="-1"><a class="header-anchor" href="#exception-1" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>NoSuchMethod/NoSuchConstructor/NoSuchField happend in [<strong>NAME</strong>]</p></div><p><strong>Abnormal</strong></p><p>The target method, constructor, and variable were not found when looking for methods, constructors, and variables.</p><p><strong>Solution</strong></p><p>Please confirm that your search criteria can correctly match the specified methods, constructors and variables in the target <code>Class</code>.</p><h6 id="exception-2" tabindex="-1"><a class="header-anchor" href="#exception-2" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Trying <strong>COUNT</strong> times and all failure by RemedyPlan</p></div><p><strong>Abnormal</strong></p><p>When using <code>RemedyPlan</code> to search for methods, constructors, and variables, the methods, constructors, and variables are still not found.</p><p><strong>Solution</strong></p><p>Please confirm the <code>RemedyPlan</code> parameter you set and the <code>Class</code> that exists in the current app, and try again.</p><h6 id="exception-3" tabindex="-1"><a class="header-anchor" href="#exception-3" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>You must set a condition when finding a Method/Constructor/Field</p></div><p><strong>Abnormal</strong></p><p>No conditions are set when looking for methods, constructors, and variables.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// No conditions are set here</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Please complete your search criteria and try again.</p><h6 id="exception-4" tabindex="-1"><a class="header-anchor" href="#exception-4" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Can't find this Class in [<strong>CLASSLOADER</strong>]: <strong>CONTENT</strong> Generated by YukiReflection#ReflectionTool</p></div><p><strong>Abnormal</strong></p><p>The <code>Class</code> object to be searched for was not found via <code>ClassLoader.searchClass</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">custom</span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">.searchClass {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> from(...)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.get()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>This is a security exception, please check the conditions you set, use the relevant tools to view the <code>Class</code> and bytecode object characteristics in the <strong>Dex</strong> and try again.</p><h6 id="exception-5" tabindex="-1"><a class="header-anchor" href="#exception-5" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Can't find this Method/Constructor/Field in [<strong>CLASS</strong>]: <strong>CONTENT</strong> Generated by YukiReflection#ReflectionTool</p></div><p><strong>Abnormal</strong></p><p>The methods, constructors, and variables that need to be found cannot be found by specifying conditions.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F69D50;">TargetClass</span><span style="color:#ADBAC7;">.method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">BooleanType</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>This is a security exception, please check the conditions you set, use the relevant tools to view the bytecode object characteristics in the <code>Class</code>, and try again.</p><h6 id="exception-6" tabindex="-1"><a class="header-anchor" href="#exception-6" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>The number of VagueType must be at least less than the count of paramTypes</p></div><p><strong>Abnormal</strong></p><p>Incorrect use of <code>VagueType</code> in <code>Method</code>, <code>Constructor</code> lookup conditions.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F69D50;">TargetClass</span><span style="color:#ADBAC7;">.method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 1></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">VagueType</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// <Scenario 2></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">VagueType</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">VagueType</span><span style="color:#ADBAC7;"> ...)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p><code>VagueType</code> cannot be completely filled in method and constructor parameters. If there is such a requirement, please use <code>paramCount</code>.</p><h6 id="exception-7" tabindex="-1"><a class="header-anchor" href="#exception-7" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Field match type class is not found</p></div><p><strong>Abnormal</strong></p><p>An instance of <code>Class</code> for <code>type</code> was not found in the lookup criteria set when looking up the variable.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">field {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Assume that the Class of the type set here does not exist</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.example.TestClass"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Please check if <code>Class</code> of <code>type</code> in the lookup condition exists and try again.</p><h6 id="exception-8" tabindex="-1"><a class="header-anchor" href="#exception-8" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Method match returnType class is not found</p></div><p><strong>Abnormal</strong></p><p>An instance of <code>Class</code> of <code>returnType</code> was not found in the search criteria set when looking up the method.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Assume that the Class of returnType set here does not exist</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.example.TestClass"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Please check if <code>Class</code> of <code>returnType</code> in the lookup condition exists and try again.</p><h6 id="exception-9" tabindex="-1"><a class="header-anchor" href="#exception-9" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">loggerE</p><p>Method/Constructor match paramType[<strong>INDEX</strong>] class is not found</p></div><p><strong>Abnormal</strong></p><p>The <code>Class</code> instance subscripted by the <code>index</code> number of <code>param</code> was not found in the search conditions set when searching for methods and constructors.</p><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Assume that the Class with subscript "No.1" set here does not exist</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">"com.example.TestClass"</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">BooleanType</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Please check if the <code>Class</code> subscripted by the <code>index</code> number of <code>param</code> in the lookup condition exists and try again.</p><h2 id="blocking-exceptions" tabindex="-1"><a class="header-anchor" href="#blocking-exceptions" aria-hidden="true">#</a> Blocking Exceptions</h2><blockquote><p>These exceptions will directly cause the app to stop running (FC), at the same time print <code>E</code> level logs on the console.</p></blockquote><h6 id="exception-10" tabindex="-1"><a class="header-anchor" href="#exception-10" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">NoClassDefFoundError</p><p>Can't find this Class in [<strong>CLASSLOADER</strong>]: <strong>CONTENT</strong> Generated by YukiReflection#ReflectionTool</p></div><p><strong>Abnormal</strong></p><p>The <code>Class</code> object you were looking for was not found via <code>String.toClass(...)</code> or <code>classOf<...>()</code>.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#96D0FF;">"com.demo.Test"</span><span style="color:#ADBAC7;">.toClass()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Please check if the <code>Class</code> matched by the current string or entity exists in the current <code>ClassLoader</code> and try again.</p><h6 id="exception-11" tabindex="-1"><a class="header-anchor" href="#exception-11" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">IllegalStateException</p><p>ClassLoader [<strong>CLASSLOADER</strong>] is not a DexClassLoader</p></div><p><strong>Abnormal</strong></p><p>Use <code>ClassLoader.searchClass</code> to find <code>Class</code> but currently <code>ClassLoader</code> does not extends <code>BaseDexClassLoader</code>.</p><p><strong>Solution</strong></p><p>This situation basically does not exist, unless the current app references a Non-ART platform executable (which not realistic) or the current <code>ClassLoader</code> is null.</p><h6 id="exception-12" tabindex="-1"><a class="header-anchor" href="#exception-12" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">IllegalStateException</p><p>VariousClass match failed of those <strong>CLASSES</strong></p></div><p><strong>Abnormal</strong></p><p>All <code>Class</code> were not found when creating indeterminate <code>Class</code> objects using <code>VariousClass</code>.</p><p><strong>Solution</strong></p><p>After checking whether there is a matching <code>Class</code> in the current app and try again.</p><h6 id="exception-13" tabindex="-1"><a class="header-anchor" href="#exception-13" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">IllegalStateException</p><p>paramTypes is empty, please use emptyParam() instead</p></div><p><strong>Abnormal</strong></p><p>The empty <code>param</code> method is preserved when looking up methods, constructors.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// No parameters are filled in parentheses</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>To identify this method, the constructor has no parameters, you can have a setter method as follows.</p><p>The first way, set <code>emptyParam</code> (recommended)</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> emptyParam()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The second way, set <code>paramCount = 0</code></p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> paramCount </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">0</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h6 id="exception-14" tabindex="-1"><a class="header-anchor" href="#exception-14" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">IllegalStateException</p><p>Cannot create classes cache for "android", please remove "name" param</p></div><p><strong>Abnormal</strong></p><p>The <code>DexClassFinder</code> cache function <code>searchClass(name = ...)</code> is used in the System Framework ("android") app.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">searchClass(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> from(...)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.get()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><p>Since the cache will store the found <code>Class</code> name in <code>SharedPreferences</code>, but the data directory does not exist in the System Framework, so please do not use this function in the System Framework.</p><h6 id="exception-15" tabindex="-1"><a class="header-anchor" href="#exception-15" aria-hidden="true">#</a> exception</h6><div class="custom-container danger"><p class="custom-container-title">IllegalStateException</p><p>Target Class type cannot cast to <strong>TYPE</strong></p></div><p><strong>Abnormal</strong></p><p>Wrong type declared when converting string class name to target <code>Class</code> using <code>Class.toClass</code>, <code>Class.toClassOrNull</code>, <code>GenericClass.argument</code> methods.</p><p>The following uses the <code>Class.toClass</code> method as an example.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// Assume the target type is Activity but it was wrongly cast to WrongClass type</span></span>
|
||
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> clazz </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"android.app.Activity"</span><span style="color:#ADBAC7;">.toClass</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">WrongClass</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>Solution</strong></p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// <Solution 1> Fill in the correct type</span></span>
|
||
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> clazz1 </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"android.app.Activity"</span><span style="color:#ADBAC7;">.toClass</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">Activity</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">()</span></span>
|
||
<span class="line"><span style="color:#768390;">// <Solution 2> Do not fill in the generic declaration</span></span>
|
||
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> clazz2 </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"android.app.Activity"</span><span style="color:#ADBAC7;">.toClass()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Please ensure that the generic type declared after executing the method is the specified target <code>Class</code> type, and you do not need to fill in the generic declaration if the target type is not sure.</p></div><!--[--><!--]--></div><footer class="page-meta"><div class="meta-item edit-link"><a class="external-link meta-item-label" href="https://github.com/fankes/YukiReflection/edit/master/docs-source/src/en/config/api-exception.md" rel="noopener noreferrer" target="_blank" aria-label="Edit this page on GitHub"><!--[--><!--]--> Edit this page on GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: qzmmcn@163.com">fankesyooni</span><!----><!--]--><!--]--></span></div></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/YukiReflection/en/config/api-example.html" class="" aria-label="API Basic Configs"><!--[--><!--]--> API Basic Configs <!--[--><!--]--></a></span><!----></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
|
||
<script type="module" src="/YukiReflection/assets/app.3cb5b3a5.js" defer></script>
|
||
</body>
|
||
</html>
|