mirror of
https://github.com/HighCapable/YukiReflection.git
synced 2025-09-07 03:05:21 +08:00
93 lines
49 KiB
HTML
93 lines
49 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>Looking for Future | 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/future.html.82378e9b.js"><link rel="modulepreload" href="/YukiReflection/assets/future.html.aa0c285e.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/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/api-exception.html.58702900.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/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/api-exception.html.bcc6510b.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"><!--[--><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="" 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="router-link-active" 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/about/future.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/about/future.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="" 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="router-link-active" 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/about/future.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/about/future.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 collapsible">Configs <span class="right arrow"></span></p><ul style="display:none;" 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 href="/YukiReflection/en/config/api-exception.html" class="sidebar-item" aria-label="API Exception Handling"><!--[--><!--]--> API Exception Handling <!--[--><!--]--></a><!----></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 active collapsible">About <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/YukiReflection/en/about/changelog.html" class="sidebar-item" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiReflection/en/about/future.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Looking for Future"><!--[--><!--]--> Looking for Future <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiReflection/en/about/future.html#future-plans" class="router-link-active router-link-exact-active sidebar-item" aria-label="Future Plans"><!--[--><!--]--> Future Plans <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiReflection/en/about/future.html#automatically-generate-reflection-code" class="router-link-active router-link-exact-active sidebar-item" aria-label="Automatically Generate Reflection Code"><!--[--><!--]--> Automatically Generate Reflection Code <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></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="looking-for-future" tabindex="-1"><a class="header-anchor" href="#looking-for-future" aria-hidden="true">#</a> Looking for Future</h1><blockquote><p>The future is bright and uncertain, let us look forward to the future development space of <code>YukiReflection</code>.</p></blockquote><h2 id="future-plans" tabindex="-1"><a class="header-anchor" href="#future-plans" aria-hidden="true">#</a> Future Plans</h2><blockquote><p>Features that <code>YukiReflection</code> may add later are included here.</p></blockquote><h3 id="automatically-generate-reflection-code" tabindex="-1"><a class="header-anchor" href="#automatically-generate-reflection-code" aria-hidden="true">#</a> Automatically Generate Reflection Code</h3><p>Use <code>stub</code> to create a <code>Kotlin</code> class, and declare the parameters in it, as well as its different states in each version.</p><p>For example, the <code>Java</code> class below is the target class we need to reflect.</p><blockquote><p>The following example</p></blockquote><div class="language-java ext-java"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">package</span><span style="color:#ADBAC7;"> com.example.test;</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#F47067;">public</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MyClass</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> String</span><span style="color:#F69D50;"> </span><span style="color:#ADBAC7;">myField</span><span style="color:#F69D50;"> </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>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">public</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">MyClass</span><span style="color:#ADBAC7;">() {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">//...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> String </span><span style="color:#DCBDFB;">myMethod1</span><span style="color:#ADBAC7;">(String </span><span style="color:#F69D50;">var1</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">int</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">var2</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">//...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">void</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">myMethod2</span><span style="color:#ADBAC7;">() {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">//...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">void</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">myMethod3</span><span style="color:#ADBAC7;">(String </span><span style="color:#F69D50;">var1</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">//...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre></div><p>Through the existing usage of the current API, this class can be called reflectively in the following way.</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;">classOf</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">MyClass</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">().buildOf().current {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myField</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> value </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> field { name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"myField"</span><span style="color:#ADBAC7;"> }.string()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myMethod1</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> methodValue </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> method { name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"myMethod1"</span><span style="color:#ADBAC7;"> }.string(</span><span style="color:#96D0FF;">"test"</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;">// Call myMethod2</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"myMethod2"</span><span style="color:#ADBAC7;"> }.call()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myMethod3</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"myMethod3"</span><span style="color:#ADBAC7;"> }.call(</span><span style="color:#96D0FF;">"test"</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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The function to be implemented at present can be directly defined as the following <code>Kotlin</code> class using the reflection function.</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:#F47067;">package</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">com.example.test</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#F47067;">@ReflectClass</span></span>
|
||
<span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MyClass</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">@ReflectField</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> myField</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> fieldValueOf(</span><span style="color:#96D0FF;">"none"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">@ReflectMethod</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">myMethod1</span><span style="color:#ADBAC7;">(var1</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, var2</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> methodReturnValueOf(</span><span style="color:#96D0FF;">"none"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">@ReflectMethod</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">myMethod2</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MethodReturnType</span><span style="color:#ADBAC7;">.</span><span style="color:#6CB6FF;">Unit</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">@ReflectMethod</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">myMethod3</span><span style="color:#ADBAC7;">(var1</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MethodReturnType</span><span style="color:#ADBAC7;">.</span><span style="color:#6CB6FF;">Unit</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 class="line-number"></div><div class="line-number"></div></div></div><p>Then we can directly call this defined <code>Kotlin</code> class to implement the reflection function, and the API will automatically generate the reflection code according to the annotation.</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;">MyClass</span><span style="color:#ADBAC7;">().</span><span style="color:#6CB6FF;">also</span><span style="color:#ADBAC7;"> {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myField</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> value </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> it.myField</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myMethod1</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> methodValue </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> it.myMethod1(</span><span style="color:#96D0FF;">"test"</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;">// Call myMethod2</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> it.myMethod2()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Call myMethod3</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> it.myMethod3(</span><span style="color:#96D0FF;">"test"</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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">Tips</p><p>The above functions may change after the actual release, and the functions of the actual version shall prevail.</p></div></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/about/future.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/about/changelog.html" class="" aria-label="Changelog"><!--[--><!--]--> Changelog <!--[--><!--]--></a></span><span class="next"><a href="/YukiReflection/en/about/contacts.html" class="" aria-label="Contact Us"><!--[--><!--]--> Contact Us <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
|
||
<script type="module" src="/YukiReflection/assets/app.3cb5b3a5.js" defer></script>
|
||
</body>
|
||
</html>
|