import{_ as s,o as a,c as n,e as l}from"./app.87c2e303.js";const o={},e=l(`<h1 id="reflectionfactory-kt" tabindex="-1"><a class="header-anchor" href="#reflectionfactory-kt" aria-hidden="true">#</a> ReflectionFactory <span class="symbol">- kt</span></h1><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u8FD9\u662F\u81EA\u5B9A\u4E49 <code>Member</code> \u548C <code>Class</code> \u76F8\u5173\u529F\u80FD\u7684\u67E5\u627E\u5339\u914D\u4EE5\u53CA <code>invoke</code> \u7684\u5C01\u88C5\u7C7B\u3002</p></blockquote><h2 id="classloader-listofclasses-ext-method" tabindex="-1"><a class="header-anchor" href="#classloader-listofclasses-ext-method" aria-hidden="true">#</a> ClassLoader.listOfClasses <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> ClassLoader.</span><span style="color:#DCBDFB;">listOfClasses</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">List</span><span style="color:#F47067;">&lt;</span><span style="color:#6CB6FF;">String</span><span style="color:#F47067;">&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5199\u51FA\u5F53\u524D <code>ClassLoader</code> \u4E0B\u6240\u6709 <code>Class</code> \u540D\u79F0\u6570\u7EC4\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u6B64\u65B9\u6CD5\u5728 <strong>Class</strong> \u6570\u91CF\u8FC7\u591A\u65F6\u4F1A\u975E\u5E38\u8017\u65F6\u3002</p><p>\u82E5\u8981\u6309\u6307\u5B9A\u89C4\u5219\u67E5\u627E\u4E00\u4E2A <strong>Class</strong>\uFF0C\u8BF7\u4F7F\u7528 <a href="#classloader-searchclass-ext-method">ClassLoader.searchClass</a> \u65B9\u6CD5\u3002</p></div><h2 id="classloader-searchclass-ext-method" tabindex="-1"><a class="header-anchor" href="#classloader-searchclass-ext-method" aria-hidden="true">#</a> ClassLoader.searchClass <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> ClassLoader.</span><span style="color:#DCBDFB;">searchClass</span><span style="color:#ADBAC7;">(context</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Context?</span><span style="color:#ADBAC7;">, name</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, async</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">DexClassFinder</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7\u5F53\u524D <code>ClassLoader</code> \u6309\u6307\u5B9A\u6761\u4EF6\u67E5\u627E\u5E76\u5F97\u5230 <strong>Dex</strong> \u4E2D\u7684 <code>Class</code>\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u6B64\u65B9\u6CD5\u5728 <strong>Class</strong> \u6570\u91CF\u8FC7\u591A\u53CA\u67E5\u627E\u6761\u4EF6\u590D\u6742\u65F6\u4F1A\u975E\u5E38\u8017\u65F6\u3002</p><p>\u5EFA\u8BAE\u542F\u7528 <strong>async</strong> \u6216\u8BBE\u7F6E <strong>name</strong> \u53C2\u6570\uFF0C<strong>name</strong> \u53C2\u6570\u5C06\u5728\u5F53\u524D APP \u4E0D\u540C\u7248\u672C\u4E2D\u81EA\u52A8\u8FDB\u884C\u672C\u5730\u7F13\u5B58\u4EE5\u63D0\u5347\u6548\u7387\u3002</p><p>\u5982\u679C\u4F7F\u7528\u4E86 <strong>async</strong> \u6216 <strong>name</strong> \u53C2\u6570\uFF0C\u5219\u5FC5\u987B\u586B\u5199 <strong>context</strong> \u53C2\u6570\u3002</p><p>\u6B64\u529F\u80FD\u5C1A\u5728\u8BD5\u9A8C\u9636\u6BB5\uFF0C\u6027\u80FD\u4E0E\u7A33\u5B9A\u6027\u53EF\u80FD\u4ECD\u7136\u5B58\u5728\u95EE\u9898\uFF0C\u4F7F\u7528\u8FC7\u7A0B\u9047\u5230\u95EE\u9898\u8BF7\u5411\u6211\u4EEC\u62A5\u544A\u5E76\u5E2E\u52A9\u6211\u4EEC\u6539\u8FDB\u3002</p></div><h2 id="class-hasextends-ext-field" tabindex="-1"><a class="header-anchor" href="#class-hasextends-ext-field" aria-hidden="true">#</a> Class.hasExtends <span class="symbol">- ext-field</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">.hasExtends</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u524D <code>Class</code> \u662F\u5426\u6709\u7EE7\u627F\u5173\u7CFB\uFF0C\u7236\u7C7B\u662F <code>Any</code> \u5C06\u88AB\u8BA4\u4E3A\u6CA1\u6709\u7EE7\u627F\u5173\u7CFB\u3002</p></blockquote><h2 id="class-extends-ext-method" tabindex="-1"><a class="header-anchor" href="#class-extends-ext-method" aria-hidden="true">#</a> Class?.extends <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">infix</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;?.</span><span style="color:#DCBDFB;">extends</span><span style="color:#ADBAC7;">(other</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u524D <code>Class</code> \u662F\u5426\u7EE7\u627F\u4E8E <code>other</code>\u3002</p></blockquote><p>\u5982\u679C\u5F53\u524D <code>Class</code> \u5C31\u662F <code>other</code> \u4E5F\u4F1A\u8FD4\u56DE <code>true</code>\u3002</p><p>\u5982\u679C\u5F53\u524D <code>Class</code> \u4E3A <code>null</code> \u6216 <code>other</code> \u4E3A <code>null</code> \u4F1A\u8FD4\u56DE <code>false</code>\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6765\u5224\u65AD\u4E24\u4E2A <code>Class</code> \u662F\u5426\u5B58\u5728\u7EE7\u627F\u5173\u7CFB\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u5047\u8BBE\u4E0B\u9762\u8FD9\u4E24\u4E2A Class \u5C31\u662F\u4F60\u9700\u8981\u5224\u65AD\u7684 Class</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classA</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classB</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#768390;">// \u5224\u65AD A \u662F\u5426\u7EE7\u627F\u4E8E B</span></span>
<span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;"> (classA extends classB) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="class-notextends-ext-method" tabindex="-1"><a class="header-anchor" href="#class-notextends-ext-method" aria-hidden="true">#</a> Class?.notExtends <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">infix</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;?.</span><span style="color:#DCBDFB;">notExtends</span><span style="color:#ADBAC7;">(other</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u524D <code>Class</code> \u662F\u5426\u4E0D\u7EE7\u627F\u4E8E <code>other</code>\u3002</p></blockquote><p>\u6B64\u65B9\u6CD5\u76F8\u5F53\u4E8E <code>extends</code> \u7684\u53CD\u5411\u5224\u65AD\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6765\u5224\u65AD\u4E24\u4E2A <code>Class</code> \u662F\u5426\u4E0D\u5B58\u5728\u7EE7\u627F\u5173\u7CFB\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u5047\u8BBE\u4E0B\u9762\u8FD9\u4E24\u4E2A Class \u5C31\u662F\u4F60\u9700\u8981\u5224\u65AD\u7684 Class</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classA</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classB</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#768390;">// \u5224\u65AD A \u662F\u5426\u4E0D\u7EE7\u627F\u4E8E B</span></span>
<span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;"> (classA notExtends classB) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="class-implements-ext-method" tabindex="-1"><a class="header-anchor" href="#class-implements-ext-method" aria-hidden="true">#</a> Class?.implements <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">infix</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;?.</span><span style="color:#DCBDFB;">implements</span><span style="color:#ADBAC7;">(other</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u524D <code>Class</code> \u662F\u5426\u5B9E\u73B0\u4E86 <code>other</code> \u63A5\u53E3\u7C7B\u3002</p></blockquote><p>\u5982\u679C\u5F53\u524D <code>Class</code> \u4E3A <code>null</code> \u6216 <code>other</code> \u4E3A <code>null</code> \u4F1A\u8FD4\u56DE <code>false</code>\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6765\u5224\u65AD\u4E24\u4E2A <code>Class</code> \u662F\u5426\u5B58\u5728\u4F9D\u8D56\u5173\u7CFB\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u5047\u8BBE\u4E0B\u9762\u8FD9\u4E24\u4E2A Class \u5C31\u662F\u4F60\u9700\u8981\u5224\u65AD\u7684 Class</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classA</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classB</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#768390;">// \u5224\u65AD A \u662F\u5426\u5B9E\u73B0\u4E86 B \u63A5\u53E3\u7C7B</span></span>
<span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;"> (classA implements classB) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="class-notimplements-ext-method" tabindex="-1"><a class="header-anchor" href="#class-notimplements-ext-method" aria-hidden="true">#</a> Class?.notImplements <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">infix</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;?.</span><span style="color:#DCBDFB;">notImplements</span><span style="color:#ADBAC7;">(other</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u524D <code>Class</code> \u662F\u5426\u672A\u5B9E\u73B0 <code>other</code> \u63A5\u53E3\u7C7B\u3002</p></blockquote><p>\u6B64\u65B9\u6CD5\u76F8\u5F53\u4E8E <code>implements</code> \u7684\u53CD\u5411\u5224\u65AD\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6765\u5224\u65AD\u4E24\u4E2A <code>Class</code> \u662F\u5426\u4E0D\u5B58\u5728\u4F9D\u8D56\u5173\u7CFB\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u5047\u8BBE\u4E0B\u9762\u8FD9\u4E24\u4E2A Class \u5C31\u662F\u4F60\u9700\u8981\u5224\u65AD\u7684 Class</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classA</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classB</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"><span style="color:#768390;">// \u5224\u65AD A \u662F\u5426\u672A\u5B9E\u73B0 B \u63A5\u53E3\u7C7B</span></span>
<span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;"> (classA notImplements classB) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="class-tojavaprimitivetype-ext-method" tabindex="-1"><a class="header-anchor" href="#class-tojavaprimitivetype-ext-method" aria-hidden="true">#</a> Class.toJavaPrimitiveType <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">toJavaPrimitiveType</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u81EA\u52A8\u8F6C\u6362\u5F53\u524D <code>Class</code> \u4E3A Java \u539F\u59CB\u7C7B\u578B (Primitive Type)\u3002</p></blockquote><p>\u5982\u679C\u5F53\u524D <code>Class</code> \u4E3A Java \u6216 Kotlin \u57FA\u672C\u7C7B\u578B\u5C06\u81EA\u52A8\u6267\u884C\u7C7B\u578B\u8F6C\u6362\u3002</p><p>\u5F53\u524D\u80FD\u591F\u81EA\u52A8\u8F6C\u6362\u7684\u57FA\u672C\u7C7B\u578B\u5982\u4E0B\u3002</p><ul><li><code>kotlin.Unit</code></li><li><code>java.lang.Void</code></li><li><code>java.lang.Boolean</code></li><li><code>java.lang.Integer</code></li><li><code>java.lang.Float</code></li><li><code>java.lang.Double</code></li><li><code>java.lang.Long</code></li><li><code>java.lang.Short</code></li><li><code>java.lang.Character</code></li><li><code>java.lang.Byte</code></li></ul><h2 id="string-toclass-ext-method" tabindex="-1"><a class="header-anchor" href="#string-toclass-ext-method" aria-hidden="true">#</a> String.toClass <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> String.</span><span style="color:#DCBDFB;">toClass</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">, initialize</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span></span>
<span class="line"></span></code></pre></div><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">reified</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> String.</span><span style="color:#DCBDFB;">toClass</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">, initialize</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7\u5B57\u7B26\u4E32\u7C7B\u540D\u8F6C\u6362\u4E3A <code>loader</code> \u4E2D\u7684\u5B9E\u4F53\u7C7B\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u76F4\u63A5\u586B\u5199\u4F60\u8981\u67E5\u627E\u7684\u76EE\u6807 <code>Class</code>\uFF0C\u5FC5\u987B\u5728\u9ED8\u8BA4 <code>ClassLoader</code> \u4E0B\u5B58\u5728\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">&quot;com.example.demo.DemoClass&quot;</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>\u4F60\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49 <code>Class</code> \u6240\u5728\u7684 <code>ClassLoader</code>\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">val</span><span style="color:#ADBAC7;"> customClassLoader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> ... </span><span style="color:#768390;">// \u5047\u8BBE\u8FD9\u4E2A\u5C31\u662F\u4F60\u7684 ClassLoader</span></span>
<span class="line"><span style="color:#96D0FF;">&quot;com.example.demo.DemoClass&quot;</span><span style="color:#ADBAC7;">.toClass(customClassLoader)</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>\u4F60\u8FD8\u53EF\u4EE5\u6307\u5B9A <code>Class</code> \u7684\u76EE\u6807\u7C7B\u578B\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u6307\u5B9A\u7684 DemoClass \u5FC5\u987B\u5B58\u5728\u6216\u4E3A\u53EF\u8BBF\u95EE\u7684 stub</span></span>
<span class="line"><span style="color:#96D0FF;">&quot;com.example.demo.DemoClass&quot;</span><span style="color:#ADBAC7;">.toClass</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">DemoClass</span><span style="color:#F47067;">&gt;</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>\u4F60\u8FD8\u53EF\u4EE5\u8BBE\u7F6E\u5728\u83B7\u53D6\u5230\u8FD9\u4E2A <code>Class</code> \u65F6\u662F\u5426\u81EA\u52A8\u6267\u884C\u5176\u9ED8\u8BA4\u7684\u9759\u6001\u65B9\u6CD5\u5757\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4E0D\u4F1A\u6267\u884C\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">// \u83B7\u53D6\u5E76\u6267\u884C DemoClass \u9ED8\u8BA4\u7684\u9759\u6001\u65B9\u6CD5\u5757</span></span>
<span class="line"><span style="color:#96D0FF;">&quot;com.example.demo.DemoClass&quot;</span><span style="color:#ADBAC7;">.toClass(initialize </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">true</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>\u9ED8\u8BA4\u7684\u9759\u6001\u65B9\u6CD5\u5757\u5728 Java \u4E2D\u4F7F\u7528\u5982\u4E0B\u65B9\u5F0F\u5B9A\u4E49\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-java ext-java"><pre class="shiki" style="background-color:#22272e;"><code><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;">DemoClass</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#F47067;">static</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">        </span><span style="color:#768390;">// \u8FD9\u91CC\u662F\u9759\u6001\u65B9\u6CD5\u5757\u7684\u5185\u5BB9</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;">public</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">DemoClass</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><h2 id="string-toclassornull-ext-method" tabindex="-1"><a class="header-anchor" href="#string-toclassornull-ext-method" aria-hidden="true">#</a> String.toClassOrNull <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> String.</span><span style="color:#DCBDFB;">toClassOrNull</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">, initialize</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"></span></code></pre></div><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">reified</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> String.</span><span style="color:#DCBDFB;">toClassOrNull</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">, initialize</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7\u5B57\u7B26\u4E32\u7C7B\u540D\u8F6C\u6362\u4E3A <code>loader</code> \u4E2D\u7684\u5B9E\u4F53\u7C7B\u3002</p></blockquote><p>\u627E\u4E0D\u5230 <code>Class</code> \u4F1A\u8FD4\u56DE <code>null</code>\uFF0C\u4E0D\u4F1A\u629B\u51FA\u5F02\u5E38\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u7528\u6CD5\u8BF7\u53C2\u8003 <a href="#string-toclass-ext-method">String.toClass</a> \u65B9\u6CD5\u3002</p><h2 id="classof-method" tabindex="-1"><a class="header-anchor" href="#classof-method" aria-hidden="true">#</a> classOf <span class="symbol">- method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">reified</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">classOf</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">, initialize</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7 <code>T</code> \u5F97\u5230\u5176 <code>Class</code> \u5B9E\u4F8B\u5E76\u8F6C\u6362\u4E3A\u5B9E\u4F53\u7C7B\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u6211\u4EEC\u8981\u83B7\u53D6\u4E00\u4E2A <code>Class</code> \u5728 <code>Kotlin</code> \u4E0B\u4E0D\u901A\u8FC7\u53CD\u5C04\u65F6\u5E94\u8BE5\u8FD9\u6837\u505A\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">DemoClass</span><span style="color:#ADBAC7;">::</span><span style="color:#6CB6FF;">class</span><span style="color:#ADBAC7;">.java</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u73B0\u5728\uFF0C\u4F60\u53EF\u4EE5\u76F4\u63A5 <code>cast</code> \u4E00\u4E2A\u5B9E\u4F8B\u5E76\u83B7\u53D6\u5B83\u7684 <code>Class</code> \u5BF9\u8C61\uFF0C\u5FC5\u987B\u5728\u5F53\u524D <code>ClassLoader</code> \u4E0B\u5B58\u5728\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">&lt;</span><span style="color:#F69D50;">DemoClass</span><span style="color:#F47067;">&gt;</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></div><p>\u82E5\u76EE\u6807\u5B58\u5728\u7684 <code>Class</code> \u4E3A <code>stub</code>\uFF0C\u901A\u8FC7\u8FD9\u79CD\u65B9\u5F0F\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49 <code>Class</code> \u6240\u5728\u7684 <code>ClassLoader</code>\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">val</span><span style="color:#ADBAC7;"> customClassLoader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> ... </span><span style="color:#768390;">// \u5047\u8BBE\u8FD9\u4E2A\u5C31\u662F\u4F60\u7684 ClassLoader</span></span>
<span class="line"><span style="color:#ADBAC7;">classOf</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">DemoClass</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;">(customClassLoader)</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><h2 id="string-hasclass-ext-method" tabindex="-1"><a class="header-anchor" href="#string-hasclass-ext-method" aria-hidden="true">#</a> String.hasClass <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> String.</span><span style="color:#DCBDFB;">hasClass</span><span style="color:#ADBAC7;">(loader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7\u5B57\u7B26\u4E32\u7C7B\u540D\u4F7F\u7528\u6307\u5B9A\u7684 <code>ClassLoader</code> \u67E5\u627E\u662F\u5426\u5B58\u5728\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u8F7B\u677E\u7684\u4F7F\u7528\u6B64\u65B9\u6CD5\u5224\u65AD\u5B57\u7B26\u4E32\u4E2D\u7684\u7C7B\u662F\u5426\u5B58\u5728\uFF0C\u6548\u679C\u7B49\u540C\u4E8E\u76F4\u63A5\u4F7F\u7528 <code>Class.forName</code>\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">if</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;com.example.demo.DemoClass&quot;</span><span style="color:#ADBAC7;">.hasClass()) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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>\u586B\u5165\u65B9\u6CD5\u4E2D\u7684 <code>loader</code> \u53C2\u6570\u53EF\u5224\u65AD\u6307\u5B9A\u7684 <code>ClassLoader</code> \u4E2D\u7684 <code>Class</code> \u662F\u5426\u5B58\u5728\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</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;">val</span><span style="color:#ADBAC7;"> customClassLoader</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ClassLoader?</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> ... </span><span style="color:#768390;">// \u5047\u8BBE\u8FD9\u4E2A\u5C31\u662F\u4F60\u7684 ClassLoader</span></span>
<span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;com.example.demo.DemoClass&quot;</span><span style="color:#ADBAC7;">.hasClass(customClassLoader)) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Your code 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 class="line-number"></div></div></div><h2 id="class-hasfield-ext-method" tabindex="-1"><a class="header-anchor" href="#class-hasfield-ext-method" aria-hidden="true">#</a> Class.hasField <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">hasField</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">FieldConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u53D8\u91CF\u662F\u5426\u5B58\u5728\u3002</p></blockquote><h2 id="class-hasmethod-ext-method" tabindex="-1"><a class="header-anchor" href="#class-hasmethod-ext-method" aria-hidden="true">#</a> Class.hasMethod <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">hasMethod</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MethodConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u65B9\u6CD5\u662F\u5426\u5B58\u5728\u3002</p></blockquote><h2 id="class-hasconstructor-ext-method" tabindex="-1"><a class="header-anchor" href="#class-hasconstructor-ext-method" aria-hidden="true">#</a> Class.hasConstructor <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">hasConstructor</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u6784\u9020\u65B9\u6CD5\u662F\u5426\u5B58\u5728\u3002</p></blockquote><h2 id="member-hasmodifiers-ext-method" tabindex="-1"><a class="header-anchor" href="#member-hasmodifiers-ext-method" aria-hidden="true">#</a> Member.hasModifiers <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> Member.</span><span style="color:#DCBDFB;">hasModifiers</span><span style="color:#ADBAC7;">(conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ModifierConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E <code>Member</code> \u4E2D\u5339\u914D\u7684\u63CF\u8FF0\u7B26\u3002</p></blockquote><h2 id="class-hasmodifiers-ext-method" tabindex="-1"><a class="header-anchor" href="#class-hasmodifiers-ext-method" aria-hidden="true">#</a> Class.hasModifiers <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">hasModifiers</span><span style="color:#ADBAC7;">(conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ModifierConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E <code>Class</code> \u4E2D\u5339\u914D\u7684\u63CF\u8FF0\u7B26\u3002</p></blockquote><h2 id="class-field-ext-method" tabindex="-1"><a class="header-anchor" href="#class-field-ext-method" aria-hidden="true">#</a> Class.field <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">field</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">FieldConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">FieldFinder</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5E76\u5F97\u5230\u53D8\u91CF\u3002</p></blockquote><h2 id="class-method-ext-method" tabindex="-1"><a class="header-anchor" href="#class-method-ext-method" aria-hidden="true">#</a> Class.method <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">method</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MethodConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MethodFinder</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5E76\u5F97\u5230\u65B9\u6CD5\u3002</p></blockquote><h2 id="class-constructor-ext-method" tabindex="-1"><a class="header-anchor" href="#class-constructor-ext-method" aria-hidden="true">#</a> Class.constructor <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorFinder</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5E76\u5F97\u5230\u6784\u9020\u65B9\u6CD5\u3002</p></blockquote><h2 id="class-generic-ext-method" tabindex="-1"><a class="header-anchor" href="#class-generic-ext-method" aria-hidden="true">#</a> Class.generic <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">generic</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">GenericClass?</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u83B7\u5F97\u5F53\u524D <code>Class</code> \u7684\u6CDB\u578B\u7236\u7C7B\u3002</p></blockquote><p>\u5982\u679C\u5F53\u524D\u5B9E\u4F8B\u4E0D\u5B58\u5728\u6CDB\u578B\u5C06\u8FD4\u56DE <code>null</code>\u3002</p><h2 id="class-generic-ext-method-1" tabindex="-1"><a class="header-anchor" href="#class-generic-ext-method-1" aria-hidden="true">#</a> Class.generic <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">generic</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">GenericClass</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">GenericClass?</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u83B7\u5F97\u5F53\u524D <code>Class</code> \u7684\u6CDB\u578B\u7236\u7C7B\u3002</p></blockquote><p>\u5982\u679C\u5F53\u524D\u5B9E\u4F8B\u4E0D\u5B58\u5728\u6CDB\u578B\u5C06\u8FD4\u56DE <code>null</code>\u3002</p><h2 id="any-current-ext-method" tabindex="-1"><a class="header-anchor" href="#any-current-ext-method" aria-hidden="true">#</a> Any.current <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">reified</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">T</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Any</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> T.</span><span style="color:#DCBDFB;">current</span><span style="color:#ADBAC7;">(ignored</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">CurrentClass</span></span>
<span class="line"></span></code></pre></div><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">reified</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">T</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Any</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> T.</span><span style="color:#DCBDFB;">current</span><span style="color:#ADBAC7;">(ignored</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">CurrentClass</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u83B7\u5F97\u5F53\u524D\u5B9E\u4F8B\u7684\u7C7B\u64CD\u4F5C\u5BF9\u8C61\u3002</p></blockquote><h2 id="class-buildof-ext-method" tabindex="-1"><a class="header-anchor" href="#class-buildof-ext-method" aria-hidden="true">#</a> Class.buildOf <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">buildOf</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> args</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span></span>
<span class="line"></span></code></pre></div><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">&lt;</span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">buildOf</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> args</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u901A\u8FC7\u6784\u9020\u65B9\u6CD5\u521B\u5EFA\u65B0\u5B9E\u4F8B\uFF0C\u6307\u5B9A\u7C7B\u578B <code>T</code> \u6216\u4EFB\u610F\u7C7B\u578B <code>Any</code>\u3002</p></blockquote><h2 id="class-allmethods-ext-method" tabindex="-1"><a class="header-anchor" href="#class-allmethods-ext-method" aria-hidden="true">#</a> Class.allMethods <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">allMethods</span><span style="color:#ADBAC7;">(isAccessible</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (index</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">, method</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Method</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u904D\u5386\u5F53\u524D\u7C7B\u4E2D\u7684\u6240\u6709\u65B9\u6CD5\u3002</p></blockquote><h2 id="class-allconstructors-ext-method" tabindex="-1"><a class="header-anchor" href="#class-allconstructors-ext-method" aria-hidden="true">#</a> Class.allConstructors <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">allConstructors</span><span style="color:#ADBAC7;">(isAccessible</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (index</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">, constructor</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Constructor</span><span style="color:#F47067;">&lt;*&gt;</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u904D\u5386\u5F53\u524D\u7C7B\u4E2D\u7684\u6240\u6709\u6784\u9020\u65B9\u6CD5\u3002</p></blockquote><h2 id="class-allfields-ext-method" tabindex="-1"><a class="header-anchor" href="#class-allfields-ext-method" aria-hidden="true">#</a> Class.allFields <span class="symbol">- ext-method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Class</span><span style="color:#F47067;">&lt;*</span><span style="color:#ADBAC7;">&gt;.</span><span style="color:#DCBDFB;">allFields</span><span style="color:#ADBAC7;">(isAccessible</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (index</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">, field</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Field</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u904D\u5386\u5F53\u524D\u7C7B\u4E2D\u7684\u6240\u6709\u53D8\u91CF\u3002</p></blockquote>`,235),p=[e];function c(t,r){return a(),n("div",null,p)}const i=s(o,[["render",c],["__file","ReflectionFactory.html.vue"]]);export{i as default};
