import{_ as s,o,c as n,a as e}from"./app.f643a53b.js";const a={},l=e(`<h1 id="yukimemberhookcreator-class" tabindex="-1"><a class="header-anchor" href="#yukimemberhookcreator-class" aria-hidden="true">#</a> YukiMemberHookCreator <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiMemberHookCreator</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> packageParam</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">PackageParam</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> hookClass</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookClass</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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5BF9 <code>hookClass</code> \u8FDB\u884C inline \u5904\u7406</p><p><code>v1.1.0</code> <code>\u4FEE\u6539</code></p><p>\u4FEE\u6B63\u62FC\u5199\u9519\u8BEF\u7684 <strong>Creater</strong> \u547D\u540D\u5230 <strong>Creator</strong></p><p><code>v1.1.5</code> <code>\u4FEE\u6539</code></p><p>\u79C1\u6709\u5316\u6784\u9020\u65B9\u6CD5</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p><code>YukiHookAPI</code> \u7684 <code>Member</code> \u6838\u5FC3 Hook \u5B9E\u73B0\u7C7B\u3002</p></blockquote><h2 id="priority-default-field" tabindex="-1"><a class="header-anchor" href="#priority-default-field" aria-hidden="true">#</a> PRIORITY_DEFAULT <span class="symbol">- 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;">PRIORITY_DEFAULT</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.80</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u9ED8\u8BA4 Hook \u56DE\u8C03\u4F18\u5148\u7EA7\u3002</p></blockquote><h2 id="priority-lowest-field" tabindex="-1"><a class="header-anchor" href="#priority-lowest-field" aria-hidden="true">#</a> PRIORITY_LOWEST <span class="symbol">- 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;">PRIORITY_LOWEST</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.80</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5EF6\u8FDF\u56DE\u8C03 Hook \u65B9\u6CD5\u7ED3\u679C\u3002</p></blockquote><h2 id="priority-highest-field" tabindex="-1"><a class="header-anchor" href="#priority-highest-field" aria-hidden="true">#</a> PRIORITY_HIGHEST <span class="symbol">- 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;">PRIORITY_HIGHEST</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.80</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u66F4\u5FEB\u56DE\u8C03 Hook \u65B9\u6CD5\u7ED3\u679C\u3002</p></blockquote><h2 id="instanceclass-field" tabindex="-1"><a class="header-anchor" href="#instanceclass-field" aria-hidden="true">#</a> instanceClass <span class="symbol">- 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;"> instanceClass</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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.2</code> <code>\u4FEE\u6539</code></p><p><s><code>thisClass</code></s> \u66F4\u540D\u4E3A <code>instanceClass</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F97\u5230\u5F53\u524D\u88AB Hook \u7684 <code>Class</code>\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u4E0D\u63A8\u8350\u76F4\u63A5\u4F7F\u7528\uFF0C\u4E07\u4E00\u5F97\u4E0D\u5230 <strong>Class</strong> \u5BF9\u8C61\u5219\u4F1A\u65E0\u6CD5\u5904\u7406\u5F02\u5E38\u5BFC\u81F4\u5D29\u6E83\u3002</p></div><h2 id="injectmember-method" tabindex="-1"><a class="header-anchor" href="#injectmember-method" aria-hidden="true">#</a> injectMember <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:#DCBDFB;">injectMember</span><span style="color:#ADBAC7;">(priority</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">, tag</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MemberHookCreator</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;">MemberHookCreator</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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p>\u589E\u52A0 <code>priority</code> Hook \u4F18\u5148\u7EA7</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6CE8\u5165\u8981 Hook \u7684 <code>Method</code>\u3001<code>Constructor</code>\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u6CE8\u5165\u4EFB\u610F <code>Method</code> \u4E0E <code>Constructor</code>\uFF0C\u4F7F\u7528 <code>injectMember</code> \u5373\u53EF\u521B\u5EFA\u4E00\u4E2A <code>Hook</code> \u5BF9\u8C61\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;">injectMember {</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>\u4F60\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49 <code>tag</code>\uFF0C\u65B9\u4FBF\u4F60\u5728\u8C03\u8BD5\u7684\u65F6\u5019\u80FD\u591F\u533A\u5206\u4F60\u7684 <code>Hook</code> \u5BF9\u8C61\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;">injectMember(tag </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;KuriharaYuki&quot;</span><span style="color:#ADBAC7;">) {</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>\u4F60\u8FD8\u53EF\u4EE5\u81EA\u5B9A\u4E49 <code>priority</code>\uFF0C\u4EE5\u63A7\u5236\u5F53\u524D Hook \u5BF9\u8C61\u5E76\u5217\u6267\u884C\u7684\u4F18\u5148\u7EA7\u901F\u5EA6\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;">injectMember(priority </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">PRIORITY_HIGHEST</span><span style="color:#ADBAC7;">) {</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><h2 id="usedangerousoperation-method" tabindex="-1"><a class="header-anchor" href="#usedangerousoperation-method" aria-hidden="true">#</a> useDangerousOperation <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;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">useDangerousOperation</span><span style="color:#ADBAC7;">(option</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5141\u8BB8 Hook \u8FC7\u7A0B\u4E2D\u7684\u6240\u6709\u5371\u9669\u884C\u4E3A\u3002</p></blockquote><p>\u8BF7\u5728 <code>option</code> \u4E2D\u952E\u5165 <code>Yes do as I say!</code> \u4EE3\u8868\u4F60\u540C\u610F\u5141\u8BB8\u6240\u6709\u5371\u9669\u884C\u4E3A\u3002</p><p>\u4F60\u8FD8\u9700\u8981\u5728\u6574\u4E2A\u8C03\u7528\u57DF\u4E2D\u58F0\u660E\u6CE8\u89E3 <code>CauseProblemsApi</code> \u4EE5\u6D88\u9664\u8B66\u544A\u3002</p><p>\u82E5\u4F60\u53EA\u9700\u8981 Hook <code>ClassLoader</code> \u7684 <code>loadClass</code> \u65B9\u6CD5\uFF0C\u8BF7\u53C2\u8003 <a href="../factory/ReflectionFactory#classloader-onloadclass-ext-method">ClassLoader.onLoadClass</a>\u3002</p><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u82E5\u4F60\u4E0D\u77E5\u9053\u5141\u8BB8\u6B64\u529F\u80FD\u4F1A\u5E26\u6765\u4F55\u79CD\u540E\u679C\uFF0C\u8BF7\u52FF\u4F7F\u7528\u3002</p></div><h2 id="memberhookcreator-class" tabindex="-1"><a class="header-anchor" href="#memberhookcreator-class" aria-hidden="true">#</a> MemberHookCreator <span class="symbol">- class</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MemberHookCreator</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> priority</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;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> tag</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u589E\u52A0 <code>priority</code> Hook \u4F18\u5148\u7EA7</p><p><code>v1.0.81</code> <code>\u4FEE\u6539</code></p><p>\u589E\u52A0 <code>packageName</code> \u5F53\u524D Hook \u7684 APP \u5305\u540D</p><p><code>v1.1.0</code> <code>\u4FEE\u6539</code></p><p>\u79FB\u9664 <code>packageName</code></p><p>\u4FEE\u6B63\u62FC\u5199\u9519\u8BEF\u7684 <strong>Creater</strong> \u547D\u540D\u5230 <strong>Creator</strong></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>Hook \u6838\u5FC3\u529F\u80FD\u5B9E\u73B0\u7C7B\uFF0C\u67E5\u627E\u548C\u5904\u7406\u9700\u8981 Hook \u7684 <code>Method</code>\u3001<code>Constructor</code>\u3002</p></blockquote><h3 class="deprecated">member - field</h3><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.1.0</code> <code>\u79FB\u9664</code></p><p>\u8BF7\u8F6C\u79FB\u5230 <code>members</code></p><h3 id="members-method" tabindex="-1"><a class="header-anchor" href="#members-method" aria-hidden="true">#</a> members <span class="symbol">- method</span></h3><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;">members</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> member</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Member?</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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u624B\u52A8\u6307\u5B9A\u8981 Hook \u7684 <code>Method</code>\u3001<code>Constructor</code>\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u6B64\u65B9\u6CD5\u8BBE\u7F6E\u76EE\u6807\u9700\u8981 Hook \u7684 <strong>Member</strong> \u5BF9\u8C61\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528 <strong>method</strong> \u6216 <strong>constructor</strong> \u65B9\u6CD5\u3002</p></div><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u8C03\u7528 <code>instanceClass</code> \u6765\u624B\u52A8\u67E5\u627E\u8981 Hook \u7684 <code>Method</code>\u3001<code>Constructor</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:#ADBAC7;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    members(instanceClass.getDeclaredMethod(</span><span style="color:#96D0FF;">&quot;test&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">))</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u540C\u6837\u5730\uFF0C\u4F60\u4E5F\u53EF\u4EE5\u4F20\u5165\u4E00\u7EC4 <code>Member</code> \u540C\u65F6\u8FDB\u884C Hook\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    members(</span></span>
<span class="line"><span style="color:#ADBAC7;">        instanceClass.getDeclaredMethod(</span><span style="color:#96D0FF;">&quot;test1&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">),</span></span>
<span class="line"><span style="color:#ADBAC7;">        instanceClass.getDeclaredMethod(</span><span style="color:#96D0FF;">&quot;test2&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">),</span></span>
<span class="line"><span style="color:#ADBAC7;">        instanceClass.getDeclaredMethod(</span><span style="color:#96D0FF;">&quot;test3&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">    )</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</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></div><h3 class="deprecated">allMethods - method</h3><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.1.0</code> <code>\u4F5C\u5E9F</code></p><p>\u8BF7\u4F7F\u7528 <code>method { name = /** name */ }.all()</code> \u6765\u53D6\u4EE3\u5B83</p><h3 class="deprecated">allConstructors - method</h3><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.1.0</code> <code>\u4F5C\u5E9F</code></p><p>\u8BF7\u4F7F\u7528 <code>allMembers(MembersType.CONSTRUCTOR)</code> \u6765\u53D6\u4EE3\u5B83</p><h3 id="allmembers-method" tabindex="-1"><a class="header-anchor" href="#allmembers-method" aria-hidden="true">#</a> allMembers <span class="symbol">- method</span></h3><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;">allMembers</span><span style="color:#ADBAC7;">(type</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MembersType</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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5E76 Hook <code>hookClass</code> \u4E2D\u7684\u5168\u90E8 <code>Method</code>\u3001<code>Constructor</code>\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u65E0\u6CD5\u51C6\u786E\u5904\u7406\u6BCF\u4E2A <strong>Member</strong> \u7684\u8FD4\u56DE\u503C\u548C <strong>param</strong>\uFF0C\u5EFA\u8BAE\u4F7F\u7528 <strong>method</strong> or <strong>constructor</strong> \u5BF9\u6BCF\u4E2A <strong>Member</strong> \u5355\u72EC Hook\u3002</p></div><h3 id="method-method" tabindex="-1"><a class="header-anchor" href="#method-method" aria-hidden="true">#</a> method <span class="symbol">- method</span></h3><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;">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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5F53\u524D <code>Class</code> \u9700\u8981 Hook \u7684 <code>Method</code> \u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u53C2\u8003 <a href="finder/members/MethodFinder">MethodFinder</a> \u67E5\u770B\u8BE6\u7EC6\u7528\u6CD5\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    method {</span></span>
<span class="line"><span style="color:#ADBAC7;">        name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;test&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">        param(</span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">        returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</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></div><p>\u82E5\u60F3 Hook \u5F53\u524D\u67E5\u627E <code>method { ... }</code> \u6761\u4EF6\u7684\u5168\u90E8\u7ED3\u679C\uFF0C\u4F60\u53EA\u9700\u8981\u5728\u6700\u540E\u52A0\u5165 <code>all</code> \u5373\u53EF\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    method {</span></span>
<span class="line"><span style="color:#ADBAC7;">        name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;test&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">        paramCount(</span><span style="color:#6CB6FF;">1</span><span style="color:#ADBAC7;">..</span><span style="color:#6CB6FF;">5</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">    }.all()</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</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></div><p>\u6B64\u65F6 <code>beforeHook</code> \u4E0E <code>afterHook</code> \u4F1A\u5728\u6BCF\u4E2A\u67E5\u627E\u5230\u7684\u7ED3\u679C\u4E2D\u591A\u6B21\u56DE\u8C03 Hook \u65B9\u6CD5\u4F53\u3002</p><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u82E5\u6CA1\u6709 <strong>all</strong>\uFF0C\u9ED8\u8BA4\u53EA\u4F1A Hook \u5F53\u524D\u6761\u4EF6\u67E5\u627E\u5230\u7684\u6570\u7EC4\u4E0B\u6807\u7ED3\u679C\u7B2C\u4E00\u4F4D\u3002</p></div><h3 id="constructor-method" tabindex="-1"><a class="header-anchor" href="#constructor-method" aria-hidden="true">#</a> constructor <span class="symbol">- method</span></h3><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;">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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u67E5\u627E\u5F53\u524D <code>Class</code> \u9700\u8981 Hook \u7684 <code>Constructor</code>\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u53C2\u8003 <a href="finder/members/ConstructorFinder">ConstructorFinder</a> \u67E5\u770B\u8BE6\u7EC6\u7528\u6CD5\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;"> { param(</span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">) }</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u82E5\u60F3 Hook \u5F53\u524D\u67E5\u627E <code>constructor { ... }</code> \u6761\u4EF6\u7684\u5168\u90E8\u7ED3\u679C\uFF0C\u4F60\u53EA\u9700\u8981\u5728\u6700\u540E\u52A0\u5165 <code>all</code> \u5373\u53EF\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;"> { paramCount(</span><span style="color:#6CB6FF;">1</span><span style="color:#ADBAC7;">..</span><span style="color:#6CB6FF;">5</span><span style="color:#ADBAC7;">) }.all()</span></span>
<span class="line"><span style="color:#ADBAC7;">    beforeHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {}</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u6B64\u65F6 <code>beforeHook</code> \u4E0E <code>afterHook</code> \u4F1A\u5728\u6BCF\u4E2A\u67E5\u627E\u5230\u7684\u7ED3\u679C\u4E2D\u591A\u6B21\u56DE\u8C03 Hook \u65B9\u6CD5\u4F53\u3002</p><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u82E5\u6CA1\u6709 <strong>all</strong>\uFF0C\u9ED8\u8BA4\u53EA\u4F1A Hook \u5F53\u524D\u6761\u4EF6\u67E5\u627E\u5230\u7684\u6570\u7EC4\u4E0B\u6807\u7ED3\u679C\u7B2C\u4E00\u4F4D\u3002</p></div><h3 id="hookparam-field-i-ext-method" tabindex="-1"><a class="header-anchor" href="#hookparam-field-i-ext-method" aria-hidden="true">#</a> HookParam.field <span class="symbol">- i-ext-method</span></h3><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;"> HookParam.</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</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u4F7F\u7528\u5F53\u524D <code>hookClass</code> \u67E5\u627E\u5E76\u5F97\u5230 <code>Field</code>\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u53C2\u8003 <a href="finder/members/FieldFinder">FieldFinder</a> \u67E5\u770B\u8BE6\u7EC6\u7528\u6CD5\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;">injectMember {</span></span>
<span class="line"><span style="color:#ADBAC7;">    method {</span></span>
<span class="line"><span style="color:#ADBAC7;">        name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;test&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">        param(</span><span style="color:#F69D50;">StringClass</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">        returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">    afterHook {</span></span>
<span class="line"><span style="color:#ADBAC7;">        </span><span style="color:#768390;">// \u8FD9\u91CC\u4E0D\u9700\u8981\u518D\u8C03\u7528 instanceClass.field \u8FDB\u884C\u67E5\u627E</span></span>
<span class="line"><span style="color:#ADBAC7;">        field {</span></span>
<span class="line"><span style="color:#ADBAC7;">            name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;isSweet&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">            type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BooleanType</span></span>
<span class="line"><span style="color:#ADBAC7;">        }.get(instance).setTrue()</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 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></div><h3 id="hookparam-method-i-ext-method" tabindex="-1"><a class="header-anchor" href="#hookparam-method-i-ext-method" aria-hidden="true">#</a> HookParam.method <span class="symbol">- i-ext-method</span></h3><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;"> HookParam.</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.2</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u4F7F\u7528\u5F53\u524D <code>hookClass</code> \u67E5\u627E\u5E76\u5F97\u5230 <code>Method</code> \u3002</p></blockquote><h3 id="hookparam-constructor-i-ext-method" tabindex="-1"><a class="header-anchor" href="#hookparam-constructor-i-ext-method" aria-hidden="true">#</a> HookParam.constructor <span class="symbol">- i-ext-method</span></h3><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;"> HookParam.</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.2</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u4F7F\u7528\u5F53\u524D <code>hookClass</code> \u67E5\u627E\u5E76\u5F97\u5230 <code>Constructor</code>\u3002</p></blockquote><h3 id="hookparam-injectmember-i-ext-method" tabindex="-1"><a class="header-anchor" href="#hookparam-injectmember-i-ext-method" aria-hidden="true">#</a> HookParam.injectMember <span class="symbol">- i-ext-method</span></h3><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;"> HookParam.</span><span style="color:#DCBDFB;">injectMember</span><span style="color:#ADBAC7;">(priority</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">, tag</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MemberHookCreator</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;">MemberHookCreator</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.88</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6CE8\u5165\u8981 Hook \u7684 <code>Method</code>\u3001<code>Constructor</code> (\u5D4C\u5957 Hook)\u3002</p></blockquote><h3 id="beforehook-method" tabindex="-1"><a class="header-anchor" href="#beforehook-method" aria-hidden="true">#</a> beforeHook <span class="symbol">- method</span></h3><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;">beforeHook</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookParam</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;">HookCallback</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.1.0</code> <code>\u4FEE\u6539</code></p><p>\u65B0\u589E <code>HookCallback</code> \u8FD4\u56DE\u7C7B\u578B</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5728 <code>Member</code> \u6267\u884C\u5B8C\u6210\u524D Hook\u3002</p></blockquote><h3 id="afterhook-method" tabindex="-1"><a class="header-anchor" href="#afterhook-method" aria-hidden="true">#</a> afterHook <span class="symbol">- method</span></h3><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;">afterHook</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookParam</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;">HookCallback</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.1.0</code> <code>\u4FEE\u6539</code></p><p>\u65B0\u589E <code>HookCallback</code> \u8FD4\u56DE\u7C7B\u578B</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5728 <code>Member</code> \u6267\u884C\u5B8C\u6210\u540E Hook\u3002</p></blockquote><h3 id="replaceany-method" tabindex="-1"><a class="header-anchor" href="#replaceany-method" aria-hidden="true">#</a> replaceAny <span class="symbol">- method</span></h3><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;">replaceAny</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookParam</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u5E76\u66FF\u6362\u6B64 <code>Member</code> \u5185\u5BB9\uFF0C\u7ED9\u51FA\u8FD4\u56DE\u503C\u3002</p></blockquote><h3 id="replaceunit-method" tabindex="-1"><a class="header-anchor" href="#replaceunit-method" aria-hidden="true">#</a> replaceUnit <span class="symbol">- method</span></h3><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;">replaceUnit</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookParam</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u5E76\u66FF\u6362\u6B64 <code>Member</code> \u5185\u5BB9\uFF0C\u6CA1\u6709\u8FD4\u56DE\u503C\uFF0C\u53EF\u4EE5\u79F0\u4E3A <code>Void</code>\u3002</p></blockquote><h3 id="replaceto-method" tabindex="-1"><a class="header-anchor" href="#replaceto-method" aria-hidden="true">#</a> replaceTo <span class="symbol">- method</span></h3><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;">replaceTo</span><span style="color:#ADBAC7;">(any</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u5E76\u66FF <code>Member</code> \u8FD4\u56DE\u503C\u3002</p></blockquote><h3 id="replacetotrue-method" tabindex="-1"><a class="header-anchor" href="#replacetotrue-method" aria-hidden="true">#</a> replaceToTrue <span class="symbol">- method</span></h3><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;">replaceToTrue</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u5E76\u66FF\u6362 <code>Member</code> \u8FD4\u56DE\u503C\u4E3A <code>true</code>\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u786E\u4FDD\u66FF\u6362 <strong>Member</strong> \u7684\u8FD4\u56DE\u5BF9\u8C61\u4E3A <strong>Boolean</strong>\u3002</p></div><h3 id="replacetofalse-method" tabindex="-1"><a class="header-anchor" href="#replacetofalse-method" aria-hidden="true">#</a> replaceToFalse <span class="symbol">- method</span></h3><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;">replaceToFalse</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u5E76\u66FF\u6362 <code>Member</code> \u8FD4\u56DE\u503C\u4E3A <code>false</code>\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u786E\u4FDD\u66FF\u6362 <strong>Member</strong> \u7684\u8FD4\u56DE\u5BF9\u8C61\u4E3A <strong>Boolean</strong>\u3002</p></div><h3 id="intercept-method" tabindex="-1"><a class="header-anchor" href="#intercept-method" aria-hidden="true">#</a> intercept <span class="symbol">- method</span></h3><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;">intercept</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u62E6\u622A\u6B64 <code>Member</code> \u3002</p></blockquote><p>\u8FD9\u5C06\u4F1A\u7981\u6B62\u6B64 <code>Member</code> \u6267\u884C\u5E76\u8FD4\u56DE <code>null</code>\u3002</p><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u4F8B\u5982 <strong>Int</strong>\u3001<strong>Long</strong>\u3001<strong>Boolean</strong> \u5E38\u91CF\u8FD4\u56DE\u503C\u7684 <strong>Member</strong> \u4E00\u65E6\u88AB\u8BBE\u7F6E\u4E3A <strong>null</strong> \u53EF\u80FD\u4F1A\u9020\u6210 Hook APP \u629B\u51FA\u5F02\u5E38\u3002</p></div><h3 id="removeself-method" tabindex="-1"><a class="header-anchor" href="#removeself-method" aria-hidden="true">#</a> removeSelf <span class="symbol">- method</span></h3><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;">removeSelf</span><span style="color:#ADBAC7;">(result</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;">-&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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u79FB\u9664\u5F53\u524D\u6CE8\u5165\u7684 Hook <code>Method</code>\u3001<code>Constructor</code> (\u89E3\u9664 Hook)\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u4F60\u53EA\u80FD\u5728 Hook \u56DE\u8C03\u65B9\u6CD5\u4E2D\u4F7F\u7528\u6B64\u529F\u80FD\u3002</p></div><h3 id="hookcallback-class" tabindex="-1"><a class="header-anchor" href="#hookcallback-class" aria-hidden="true">#</a> HookCallback <span class="symbol">- class</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HookCallback</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>Hook \u65B9\u6CD5\u4F53\u56DE\u8C03\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h4 id="onfailurethrowtoapp-method" tabindex="-1"><a class="header-anchor" href="#onfailurethrowtoapp-method" aria-hidden="true">#</a> onFailureThrowToApp <span class="symbol">- method</span></h4><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;">onFailureThrowToApp</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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5F53\u56DE\u8C03\u65B9\u6CD5\u4F53\u5185\u53D1\u751F\u5F02\u5E38\u65F6\u5C06\u5F02\u5E38\u629B\u51FA\u7ED9\u5F53\u524D Hook APP\u3002</p></blockquote><h3 id="result-class" tabindex="-1"><a class="header-anchor" href="#result-class" aria-hidden="true">#</a> Result <span class="symbol">- class</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C Hook \u7ED3\u679C\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h4 id="result-method" tabindex="-1"><a class="header-anchor" href="#result-method" aria-hidden="true">#</a> result <span class="symbol">- method</span></h4><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;">result</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><code>v1.0.5</code> <code>\u4FEE\u6539</code></p><p><s><code>failures</code></s> \u4FEE\u6539\u4E3A <code>result</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u521B\u5EFA\u76D1\u542C\u5931\u8D25\u4E8B\u4EF6\u65B9\u6CD5\u4F53\u3002</p></blockquote><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528\u6B64\u65B9\u6CD5\u4E3A <code>Result</code> \u7C7B\u521B\u5EFA <code>lambda</code> \u65B9\u6CD5\u4F53\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;">injectMember {</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;">}.result {</span></span>
<span class="line"><span style="color:#ADBAC7;">    onHooked {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    onAlreadyHooked {}</span></span>
<span class="line"><span style="color:#ADBAC7;">    ignoredConductFailure()</span></span>
<span class="line"><span style="color:#ADBAC7;">    onHookingFailure {}</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></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></div><h4 id="by-method" tabindex="-1"><a class="header-anchor" href="#by-method" aria-hidden="true">#</a> by <span class="symbol">- method</span></h4><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;">by</span><span style="color:#ADBAC7;">(condition</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-&gt;</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.5</code> <code>\u65B0\u589E</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6DFB\u52A0\u6267\u884C Hook \u9700\u8981\u6EE1\u8DB3\u7684\u6761\u4EF6\uFF0C\u4E0D\u6EE1\u8DB3\u6761\u4EF6\u5C06\u76F4\u63A5\u505C\u6B62 Hook\u3002</p></blockquote><h4 id="onhooked-method" tabindex="-1"><a class="header-anchor" href="#onhooked-method" aria-hidden="true">#</a> onHooked <span class="symbol">- method</span></h4><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;">onHooked</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Member</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.70</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C <code>members</code> Hook \u6210\u529F\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><p>\u5728\u9996\u6B21 Hook \u6210\u529F\u540E\u56DE\u8C03\u3002</p><p>\u5728\u91CD\u590D Hook \u65F6\u4F1A\u56DE\u8C03 <code>onAlreadyHooked</code>\u3002</p><h4 id="onalreadyhooked-method" tabindex="-1"><a class="header-anchor" href="#onalreadyhooked-method" aria-hidden="true">#</a> onAlreadyHooked <span class="symbol">- method</span></h4><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;">onAlreadyHooked</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Member</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.89</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C <code>members</code> \u91CD\u590D Hook \u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u540C\u4E00\u4E2A <strong>hookClass</strong> \u4E2D\u7684\u540C\u4E00\u4E2A <strong>members</strong> \u4E0D\u4F1A\u88AB API \u91CD\u590D Hook\uFF0C\u82E5\u7531\u4E8E\u5404\u79CD\u539F\u56E0\u91CD\u590D Hook \u4F1A\u56DE\u8C03\u6B64\u65B9\u6CD5\u3002</p></div><h4 id="onnosuchmemberfailure-method" tabindex="-1"><a class="header-anchor" href="#onnosuchmemberfailure-method" aria-hidden="true">#</a> onNoSuchMemberFailure <span class="symbol">- method</span></h4><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;">onNoSuchMemberFailure</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Throwable</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.5</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C <code>members</code> \u4E0D\u5B58\u5728\u53D1\u751F\u9519\u8BEF\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><h4 id="onconductfailure-method" tabindex="-1"><a class="header-anchor" href="#onconductfailure-method" aria-hidden="true">#</a> onConductFailure <span class="symbol">- method</span></h4><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;">onConductFailure</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">HookParam</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">Throwable</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C Hook \u8FDB\u884C\u8FC7\u7A0B\u4E2D\u53D1\u751F\u9519\u8BEF\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><h4 id="onhookingfailure-method" tabindex="-1"><a class="header-anchor" href="#onhookingfailure-method" aria-hidden="true">#</a> onHookingFailure <span class="symbol">- method</span></h4><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;">onHookingFailure</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Throwable</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C Hook \u5F00\u59CB\u65F6\u53D1\u751F\u7684\u9519\u8BEF\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><h4 id="onallfailure-method" tabindex="-1"><a class="header-anchor" href="#onallfailure-method" aria-hidden="true">#</a> onAllFailure <span class="symbol">- method</span></h4><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;">onAllFailure</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Throwable</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C\u5168\u90E8 Hook \u8FC7\u7A0B\u53D1\u751F\u9519\u8BEF\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><h4 id="ignorednosuchmemberfailure-method" tabindex="-1"><a class="header-anchor" href="#ignorednosuchmemberfailure-method" aria-hidden="true">#</a> ignoredNoSuchMemberFailure <span class="symbol">- method</span></h4><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;">ignoredNoSuchMemberFailure</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</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.5</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5FFD\u7565 <code>members</code> \u4E0D\u5B58\u5728\u53D1\u751F\u7684\u9519\u8BEF\u3002</p></blockquote><h4 id="ignoredconductfailure-method" tabindex="-1"><a class="header-anchor" href="#ignoredconductfailure-method" aria-hidden="true">#</a> ignoredConductFailure <span class="symbol">- method</span></h4><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;">ignoredConductFailure</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5FFD\u7565 Hook \u8FDB\u884C\u8FC7\u7A0B\u4E2D\u53D1\u751F\u7684\u9519\u8BEF\u3002</p></blockquote><h4 id="ignoredhookingfailure-method" tabindex="-1"><a class="header-anchor" href="#ignoredhookingfailure-method" aria-hidden="true">#</a> ignoredHookingFailure <span class="symbol">- method</span></h4><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;">ignoredHookingFailure</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5FFD\u7565 Hook \u5F00\u59CB\u65F6\u53D1\u751F\u7684\u9519\u8BEF\u3002</p></blockquote><h4 id="ignoredallfailure-method" tabindex="-1"><a class="header-anchor" href="#ignoredallfailure-method" aria-hidden="true">#</a> ignoredAllFailure <span class="symbol">- method</span></h4><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;">ignoredAllFailure</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</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</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5FFD\u7565\u5168\u90E8 Hook \u8FC7\u7A0B\u53D1\u751F\u7684\u9519\u8BEF\u3002</p></blockquote><h4 id="remove-method" tabindex="-1"><a class="header-anchor" href="#remove-method" aria-hidden="true">#</a> remove <span class="symbol">- method</span></h4><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;">remove</span><span style="color:#ADBAC7;">(result</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;">-&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.1.0</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u79FB\u9664\u5F53\u524D\u6CE8\u5165\u7684 Hook <code>Method</code>\u3001<code>Constructor</code> (\u89E3\u9664 Hook)\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u4F60\u53EA\u80FD\u5728 Hook \u6210\u529F\u540E\u624D\u80FD\u89E3\u9664 Hook\uFF0C\u53EF\u76D1\u542C <strong>onHooked</strong> \u4E8B\u4EF6\u3002</p></div><h2 id="result-class-1" tabindex="-1"><a class="header-anchor" href="#result-class-1" aria-hidden="true">#</a> Result <span class="symbol">- class</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</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.3</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C\u5168\u90E8 Hook \u7ED3\u679C\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="result-method-1" tabindex="-1"><a class="header-anchor" href="#result-method-1" aria-hidden="true">#</a> result <span class="symbol">- method</span></h3><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;">result</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.3</code> <code>\u65B0\u589E</code></p><p><code>v1.0.5</code> <code>\u4FEE\u6539</code></p><p><s><code>failures</code></s> \u4FEE\u6539\u4E3A <code>result</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u521B\u5EFA\u76D1\u542C\u4E8B\u4EF6\u65B9\u6CD5\u4F53\u3002</p></blockquote><h3 id="by-method-1" tabindex="-1"><a class="header-anchor" href="#by-method-1" aria-hidden="true">#</a> by <span class="symbol">- method</span></h3><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;">by</span><span style="color:#ADBAC7;">(condition</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-&gt;</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.5</code> <code>\u65B0\u589E</code></p><p><code>v1.0.80</code> <code>\u4FEE\u6539</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6DFB\u52A0\u6267\u884C Hook \u9700\u8981\u6EE1\u8DB3\u7684\u6761\u4EF6\uFF0C\u4E0D\u6EE1\u8DB3\u6761\u4EF6\u5C06\u76F4\u63A5\u505C\u6B62 Hook\u3002</p></blockquote><h3 id="onpreparehook-method" tabindex="-1"><a class="header-anchor" href="#onpreparehook-method" aria-hidden="true">#</a> onPrepareHook <span class="symbol">- method</span></h3><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;">onPrepareHook</span><span style="color:#ADBAC7;">(callback</span><span style="color:#F47067;">:</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.70</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C <code>hookClass</code> \u5B58\u5728\u65F6\u51C6\u5907\u5F00\u59CB Hook \u7684\u64CD\u4F5C\u3002</p></blockquote><h3 id="onhookclassnotfoundfailure-method" tabindex="-1"><a class="header-anchor" href="#onhookclassnotfoundfailure-method" aria-hidden="true">#</a> onHookClassNotFoundFailure <span class="symbol">- method</span></h3><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;">onHookClassNotFoundFailure</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Throwable</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;">Result</span></span>
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.3</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u76D1\u542C <code>hookClass</code> \u627E\u4E0D\u5230\u65F6\u53D1\u751F\u9519\u8BEF\u7684\u56DE\u8C03\u65B9\u6CD5\u3002</p></blockquote><h3 id="ignoredhookclassnotfoundfailure-method" tabindex="-1"><a class="header-anchor" href="#ignoredhookclassnotfoundfailure-method" aria-hidden="true">#</a> ignoredHookClassNotFoundFailure <span class="symbol">- method</span></h3><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;">ignoredHookClassNotFoundFailure</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</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.3</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5FFD\u7565 <code>hookClass</code> \u627E\u4E0D\u5230\u65F6\u51FA\u73B0\u7684\u9519\u8BEF\u3002</p></blockquote>`,400),p=[l];function c(r,t){return o(),n("div",null,p)}const i=s(a,[["render",c],["__file","YukiMemberHookCreator.html.vue"]]);export{i as default};
