119 Commits

Author SHA1 Message Date
10643305ec docs: update README 2025-06-25 16:45:54 +08:00
47d590d6a1 refactor: say good night to YukiReflection 2025-06-17 18:37:05 +08:00
d4ccd19ecd chore: bump dependencies 2025-03-17 00:15:37 +08:00
a92e4e0dcb chore: bump gradle to 8.13 2025-03-17 00:15:31 +08:00
b1fa277bc1 chore: update .editorconfig 2025-03-17 00:15:20 +08:00
6fc3448c2d chore: update project files 2025-03-17 00:15:01 +08:00
20ead7a981 chore: bump ci to v4 2025-02-22 02:16:18 +08:00
c58771eb1c chore: update .gitignore 2025-02-22 02:15:49 +08:00
453c8757a2 docs: update license 2025-02-05 10:37:25 +08:00
efeb3aa12a chore: update project files 2025-02-05 10:37:11 +08:00
a43ff83fed docs: update license 2025-01-13 10:50:58 +08:00
864a6db24a chore: update project files 2025-01-13 10:50:54 +08:00
eb669f3ad5 chore: update target sdk to 35 2024-11-10 22:06:01 +08:00
fcaf83b930 chore: bump dependencies 2024-11-10 22:05:32 +08:00
a3173ab245 chore: bump gradle to 8.10.2 2024-11-10 22:05:28 +08:00
32910b8348 chore: update .editorconfig 2024-06-21 10:16:53 +08:00
1ec33a30fe chore: bump dependencies & support Kotlin 2.0.0 2024-06-20 11:48:21 +08:00
7b6262e9a6 chore: bump gradle to 8.7 2024-06-20 11:48:08 +08:00
a13b1d326e chore: update .editorconfig 2024-06-20 11:48:01 +08:00
5152b895c3 chore: bump dependencies 2024-02-20 11:51:11 +08:00
8d113ce2ce chore: bump gradle to 8.6 2024-02-20 11:48:31 +08:00
364f13462c chore: update .editorconfig 2024-01-13 21:30:13 +08:00
a9ec361c3e docs: update contacts 2024-01-02 03:46:25 +08:00
9f34d3d975 docs: update copyright date to 2024 for all existing files 2024-01-01 01:39:10 +08:00
e63cd6341e docs: update about 2023-12-31 21:05:25 +08:00
370a5cfb97 style: merge to new ktlint version & rules 2023-12-29 21:42:24 +08:00
217b7d5efe chore: update .gitignore 2023-12-28 23:36:42 +08:00
748116bbde chore: merge to new maven publish way 2023-12-28 23:35:05 +08:00
1cbb12f9e1 chore: bump dependencies 2023-12-28 23:17:51 +08:00
dcf0f57648 chore: bump gradle to 8.5 2023-12-28 23:17:43 +08:00
a8c9a3afe1 docs: updates (some unimportant) 2023-12-18 09:11:25 +08:00
ae372587b7 chore(docs): bump dependencies 2023-12-18 09:10:18 +08:00
a92328268e docs: add new future 2023-12-18 07:25:53 +08:00
be9ae3bde7 docs: use relative link 2023-12-11 02:31:38 +08:00
aa2a057067 chore: update project files 2023-12-11 02:31:33 +08:00
353e85c03e chore: bump dependency versions 2023-12-11 01:11:14 +08:00
6a0ff96492 docs: update README-zh-CN 2023-12-11 01:07:30 +08:00
12a63e51d8 docs: update promotion 2023-11-18 18:11:28 +08:00
51f411ab39 chore: bump "com.highcapable.sweetdependency" version to 1.0.4 2023-11-14 01:06:31 +08:00
e14a7273d2 chore: bump "com.highcapable.sweetproperty" version to 1.0.5 2023-11-08 15:22:32 +08:00
bcdf203f1f chore: bump dependencies 2023-11-04 03:40:05 +08:00
7112845958 chore: bump plugin versions
- bump "com.highcapable.sweetdependency" version to 1.0.3
- bump "com.highcapable.sweetproperty" version to 1.0.4
2023-11-04 03:16:21 +08:00
7c62a6c42a docs: fix payment code url 2023-10-26 03:55:10 +08:00
47961b9673 docs: update promotion 2023-10-24 22:18:00 +08:00
414c7ac447 docs: additional update instructions 2023-10-07 18:02:35 +08:00
b05c18eb10 Bump version to 1.0.3 2023-10-07 17:35:55 +08:00
d84fdd6af1 style: use "2.0.0" instead "2.x.x" 2023-10-07 17:15:35 +08:00
99abe9190c refactor: change license to Apache-2.0 2023-10-07 17:10:15 +08:00
98a0c212de docs: update features 2023-10-06 02:20:55 +08:00
7aea96f3fc docs: update api docs 2023-10-06 02:20:15 +08:00
bed0d42de0 feat: add lazyClass, lazyClassOrNull functions 2023-10-06 02:19:35 +08:00
6f26fbc73e refactor: change repository owner to HighCapable 2023-10-05 02:50:55 +08:00
7a49112446 docs: update Java requirement description 2023-10-05 02:26:55 +08:00
bd68a85171 refactor: merge samples all platform to compose 2023-10-04 22:36:05 +08:00
26c2d4c775 docs: update features 2023-10-04 01:00:05 +08:00
8faf5f73a7 feat: update api-exception 2023-10-03 23:22:15 +08:00
ac40842d9d feat: allow no condition finding and ignore member access exception 2023-10-03 23:22:00 +08:00
4f25c89ea7 fix: throwable not print in console 2023-10-03 22:45:05 +08:00
a572c65677 refactor: make BaseFinder.BaseResult public 2023-10-02 23:07:25 +08:00
a681ac61f7 refactor: merge HashSet to MutableSet, HashMap to MutableMap, ArrayList to MutableList 2023-10-02 00:35:35 +08:00
8b7de28e33 refactor: merge HashSet, ArrayList to MutableList 2023-10-01 23:00:35 +08:00
2fa397f8ac docs: update api docs 2023-10-01 01:00:25 +08:00
5e34d66f96 fix: make actualTypeArguments not force cast to Class type 2023-10-01 00:59:51 +08:00
6e435244f6 feat: update demo 2023-10-01 00:45:35 +08:00
1ec7fcd33c refactor: change some comments 2023-09-27 22:17:57 +08:00
184701e563 docs: update api-example 2023-09-27 21:52:05 +08:00
7c066af116 docs: update api docs 2023-09-27 21:41:36 +08:00
bb9c38cde9 refactor: merge logs related function to debugLog and YLog.Configs 2023-09-27 21:41:15 +08:00
3a0c8cfef6 refactor: rename YukiLog to YLog 2023-09-27 20:00:36 +08:00
c0a1ab0e1d refactor: make throwable dump in logs 2023-09-27 19:32:14 +08:00
194fc4425c refactor: optimize YukiLog 2023-09-27 19:32:09 +08:00
809220d243 refactor: remove "" and other comments 2023-09-27 18:17:20 +08:00
6704b06dfa refactor: use magic to hide lint on non-public, inline api
- remove all YukiPrivateApi and @PublishedApi
2023-09-27 18:01:55 +08:00
5093caf46e chore: bump plugin versions
- bump "com.highcapable.sweetdependency" version to 1.0.2
- bump "com.highcapable.sweetproperty" version to 1.0.3
- update build script usage
2023-09-26 08:59:02 +08:00
e456636644 style: rename toStackTrack to dumpToString 2023-09-26 02:33:56 +08:00
f1500f0733 refactor: optimize core finder code
- fix remedy plan not show any errors problem
- rearrange some code
2023-09-24 01:09:17 +08:00
373899ba5a feat: update demo 2023-09-23 22:49:40 +08:00
a85b795a06 docs: update api-example 2023-09-23 22:49:35 +08:00
6b4b33a804 docs: update api docs 2023-09-23 22:49:20 +08:00
25d907ff1e refactor: replace isAllowPrintingLogs to isEnableLogs 2023-09-23 22:49:04 +08:00
de4b50944e refactor: merge LoggerFactory to YukiLog 2023-09-23 22:48:35 +08:00
623c55f6fd docs(fix): tag level error 2023-09-23 22:23:45 +08:00
74fcd0c290 style: use TAG instead hardcode 2023-09-23 21:00:47 +08:00
8718c14e1b refactor: change ArrayMap (Android) to HashMap 2023-09-23 20:58:31 +08:00
f2b90caab0 refactor: merge all util functions to factory 2023-09-23 20:57:01 +08:00
ac04eacbd4 feat: update demo 2023-09-23 20:56:55 +08:00
6f8072dd52 docs: update api docs 2023-09-23 20:27:05 +08:00
ce0dd89a05 feat: add TAG & merge API_VERSION_NAME, API_VERSION_CODE to VERSION 2023-09-23 20:26:51 +08:00
32cd9f4f4c docs: correct comments 2023-09-23 19:39:00 +08:00
6a8f4d52f6 docs: optimize comments 2023-09-23 19:35:02 +08:00
a89176de16 docs(style): optimize symbols 2023-09-23 12:48:10 +08:00
03206bb5c9 docs: optimize comments 2023-09-23 12:37:09 +08:00
998ad8cd02 ci: add docs deploy 2023-09-23 12:03:16 +08:00
32702e01f4 docs(chore): update dependencies & remove old file 2023-09-23 11:49:18 +08:00
3c779850f9 docs: remove manually deployed 2023-09-23 11:48:26 +08:00
cbad9c903a docs: update docs compile files 2023-09-22 22:03:48 +08:00
b03cd3bf77 docs: add new contacts 2023-09-22 22:02:05 +08:00
7a62fc2894 docs: update some functions 2023-09-22 21:59:20 +08:00
98b1c0556e docs: optimize comments 2023-09-22 17:13:24 +08:00
0d386153a2 style: optimize code 2023-09-22 17:12:28 +08:00
bfcad65dc8 docs: optimize comments 2023-09-22 17:02:45 +08:00
1c205afd37 feat: lots of changes
- move demo-app to samples and rename demo-android
- rename yukireflection to yukireflection-core
- add demo-jvm in samples
- convert yukireflection-core from android to java-library
- optimize code
- other small changes
2023-09-22 17:00:54 +08:00
d02a5f8282 docs: update README, README-zh-CN 2023-09-22 17:00:22 +08:00
fd79c4ef0d chore: migrate build script from groovy to kts
- using SweetDependency, SweetProperty
- using new maven publish function
- update gradle and dependencies
2023-09-22 17:00:04 +08:00
7f15ad57d9 chore: clean up build step files 2023-09-22 16:59:28 +08:00
4a0cffdb7f [Change Commit Specification] Use the new commit spec from here on
child commits:
chore: add .editorconfig
2023-09-22 16:51:25 +08:00
47c7600a6b Fix naming of "ShortArrayType" in VariableTypeFactory 2023-06-26 05:59:55 +08:00
25cb5e773f Automatically compile documentation (1.0.2) 2023-05-12 17:06:26 +08:00
97d3adc006 Fix project url changed problem in type define documentation 2023-05-12 17:03:35 +08:00
9d0dcf19df Fix translation problem in features documentation 2023-05-12 17:02:25 +08:00
6067ce9123 Fix get interfaces of class by (@yangyiyu08) in ReflectionFactory 2023-05-05 23:50:25 +08:00
2b90d7ebb6 Automatically compile documentation (1.0.2) 2023-04-26 15:03:59 +08:00
78a399c501 Fix "GitHub" spelling in all files 2023-04-26 15:03:25 +08:00
0728b5e167 Automatically compile documentation (1.0.2) 2023-04-25 05:48:07 +08:00
aad3f146f8 Update version to 1.0.2 2023-04-25 05:41:35 +08:00
9593ef3408 Update api-example documentation 2023-04-25 05:12:35 +08:00
e9219a51f3 Modify remove Members cache function, optimizing performance of finder 2023-04-25 05:03:35 +08:00
df6f698629 Added Sequence.findLastIndex, Sequence.lastIndex functions in UtilsFactory 2023-04-25 04:30:05 +08:00
e6cc545fe2 Modify change some HashMap to ArrayMap to save memory 2023-04-20 17:21:55 +08:00
406 changed files with 5713 additions and 12672 deletions

35
.editorconfig Normal file
View File

@@ -0,0 +1,35 @@
# noinspection EditorConfigKeyCorrectness
[{*.kt,*.kts}]
ktlint_standard_annotation = disabled
ktlint_standard_filename = disabled
ktlint_standard_wrapping = disabled
ktlint_standard_import-ordering = enabled
ktlint_standard_max-line-length = disabled
ktlint_standard_multiline-if-else = disabled
ktlint_standard_argument-list-wrapping = disabled
ktlint_standard_parameter-list-wrapping = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_function_signature_body_expression_wrapping = multiline
ktlint_standard_string-template-indent = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_if-else-wrapping = disabled
ktlint_standard_if-else-bracing = disabled
ktlint_standard_statement-wrapping = disabled
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_no-empty-file = disabled
ktlint_standard_property-naming = disabled
ktlint_standard_function-naming = disabled
ktlint_standard_chain-method-continuation = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_condition-wrapping = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_no-trailing-spaces = disabled
ktlint_standard_multiline-loop = disabled
ij_continuation_indent_size = 2
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 150

37
.github/workflows/docs-deploy.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Deploy to GitHub pages
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'docs-source/**'
- '.github/workflows/**'
permissions:
contents: write
jobs:
docs:
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build VuePress site
run: |
cd docs-source
yarn -i
yarn docs:build-gh-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs-source/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

118
.gitignore vendored
View File

@@ -1,16 +1,110 @@
## Fully .gtignore for IntelliJ, Android Studio and Gradle based Java projects
## References:
## - https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
## - https://github.com/android/platform-samples/blob/main/.gitignore
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
.idea/.name
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
.idea/caches
.idea/material_theme**
.idea/other.xml
*.iml
.gradle
.maven
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
*.ipr
# Kotlin
.kotlin
# Misc
.idea/misc.xml
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Android studio 3.1+ additional
.idea/deployment*.xml
.idea/assetWizardSettings.xml
.idea/androidTestResultsUserPreferences.xml
# Android projects
**/local.properties
/captures
.externalNativeBuild
.cxx
local.properties
# Gradle projects
.gradle
build/
# Mkdocs temporary serving folder
docs-gen
site
*.bak
.idea/appInsightsSettings.xml
# Mac OS
.DS_Store

4
.idea/.gitignore generated vendored
View File

@@ -1,3 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
/gradle.xml
/misc.xml
/workspace.xml

6
.idea/AndroidProjectSystem.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

6
.idea/compiler.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

20
.idea/gradle.xml generated
View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/demo-app" />
<option value="$PROJECT_DIR$/yukireflection" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View File

@@ -1,11 +1,63 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ClassCanBeRecord" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="myIgnoredAnnotations">
<list>
<option value="io.micronaut.*" />
<option value="jakarta.*" />
<option value="javax.*" />
<option value="org.springframework.*" />
<option value="java.lang.SuppressWarnings" />
</list>
</option>
</inspection_tool>
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="FieldCanBeLocal" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

6
.idea/kotlinc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="2.1.10" />
</component>
</project>

7
.idea/ktlint-plugin.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KtLint plugin">
<ktlintMode>MANUAL</ktlintMode>
<formatOnSave>false</formatOnSave>
</component>
</project>

11
.idea/ktlint.xml generated Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KtlintProjectConfiguration">
<treatAsErrors>false</treatAsErrors>
<disabledRules>
<list>
<option value="package-name" />
</list>
</disabledRules>
</component>
</project>

10
.idea/migrations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

10
.idea/misc.xml generated
View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

17
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

215
LICENSE
View File

@@ -1,21 +1,202 @@
MIT License
Copyright (c) 2022 HighCapable
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Definitions.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright HighCapable [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,84 +1,72 @@
# Yuki Reflection
![Blank](https://img.shields.io/badge/license-MIT-blue)
![Blank](https://img.shields.io/badge/version-v1.0.1-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiReflection)
<br/><br/>
<img src="https://github.com/fankes/YukiReflection/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
<br/>
<br/>
🌴️ 一个使用 Kotlin 构建的 Android 平台高效反射 API。
<br/>
[![GitHub license](https://img.shields.io/github/license/HighCapable/YukiReflection?color=blue&style=flat-square)](https://github.com/HighCapable/YukiReflection/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/HighCapable/YukiReflection?display_name=release&logo=github&color=green&style=flat-square)](https://github.com/HighCapable/YukiReflection/releases)
[![Telegram](https://img.shields.io/badge/discussion-Telegram-blue.svg?logo=telegram&style=flat-square)](https://t.me/YukiReflection)
[![Telegram](https://img.shields.io/badge/discussion%20dev-Telegram-blue.svg?logo=telegram&style=flat-square)](https://t.me/HighCapable_Dev)
[![QQ](https://img.shields.io/badge/discussion%20dev-QQ-blue.svg?logo=tencent-qq&logoColor=red&style=flat-square)](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
[English](https://github.com/fankes/YukiReflection/blob/master/README.md) | 简体中文
<img src="img-src/icon.png" width = "100" height = "100" alt="LOGO"/>
🌴️ 一个使用 Kotlin 构建的用于 Java 和 Android 平台高效反射 API。
[English](README.md) | 简体中文
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
这个项目属于上述组织,**点击上方链接关注这个组织**,发现更多好项目。
## 🚨 此项目已停止维护
此项目由于很多未能解决的黑盒问题已被弃用,我们不再推荐任何人使用它,现在请迁移到全新设计的 [KavaRef](https://github.com/HighCapable/KavaRef)。
## 这是什么
- 这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API同时也是 [YukiHookAPI](https://github.com/fankes/YukiHookAPI) 正在使用的核心功能
- 名称取自 [《ももくり》女主 栗原 雪(Yuki)](https://www.bilibili.com/bangumi/play/ss5016)
这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API同时也是 [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI)
正在使用的核心功能。
## 它能做什么
- 取代 Java 原生的反射 API使用更加人性化的语言实现一套更加完善的反射方案
- 使用注解的方式声明需要反射的类或方法、变量,构造一个 `stub`,直接调用即可实现与反射 API 相同的功能,更加优雅高效 (正在开发,预计在后期逐渐实现此功能)
名称取自 [《ももくり》女主 栗原 雪(Yuki)](https://www.bilibili.com/bangumi/play/ss5016)。
## 开始使用
- [点击这里](https://fankes.github.io/YukiReflection/zh-cn/) 前往文档页面查看更多详细教程和内容。
[点击这里](https://highcapable.github.io/YukiReflection/zh-cn/) 前往文档页面查看更多详细教程和内容。
## 联系我们
## 项目推广
- [点击加入 Telegram 群组](https://t.me/YukiReflection)
## 展望未来
如果你喜欢 `YukiReflection` 项目,欢迎为此项目贡献你的代码 **PR**,可以是任何改进的建议以及新增的功能。
## 合作项目
以下是经过合作并稳定使用 `YukiReflection` 的项目。
| Repository | Developer |
|------------------------------------------------------|------------------------------------------|
| [YukiHookAPI](https://github.com/fankes/YukiHookAPI) | [fankesyooni](https://github.com/fankes) |
你也在使用 `YukiReflection` 吗?快来 **PR** 将你的存储仓库添加到上方的列表 (私有仓库可以不需要注明网页链接)。
## 捐赠支持
- 工作不易,无意外情况此项目将继续维护下去,提供更多可能,欢迎打赏。<br/><br/>
<img src="https://github.com/fankes/YukiReflection/blob/master/img-src/wechat_code.jpg?raw=true" width = "200" height = "200"/>
<!--suppress HtmlDeprecatedAttribute -->
<div align="center">
<h2>嘿,还请君留步!👋</h2>
<h3>这里有 Android 开发工具、UI 设计、Gradle 插件、Xposed 模块和实用软件等相关项目。</h3>
<h3>如果下方的项目能为你提供帮助,不妨为我点个 star 吧!</h3>
<h3>所有项目免费、开源,遵循对应开源许可协议。</h3>
<h1><a href="https://github.com/fankes/fankes/blob/main/project-promote/README-zh-CN.md">→ 查看更多关于我的项目,请点击这里 ←</a></h1>
</div>
## Star History
![Star History Chart](https://api.star-history.com/svg?repos=fankes/YukiReflection&type=Date)
![Star History Chart](https://api.star-history.com/svg?repos=HighCapable/YukiReflection&type=Date)
## 许可证
- [MIT](https://choosealicense.com/licenses/mit)
- [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
```
MIT License
Apache License Version 2.0
Copyright (C) 2019-2023 HighCapable
Copyright (C) 2019 HighCapable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
https://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
版权所有 © 2019-2023 HighCapable
版权所有 © 2019 HighCapable

104
README.md
View File

@@ -1,83 +1,73 @@
# Yuki Reflection
![Blank](https://img.shields.io/badge/license-MIT-blue)
![Blank](https://img.shields.io/badge/version-v1.0.1-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiReflection)
<br/><br/>
<img src="https://github.com/fankes/YukiReflection/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
<br/>
<br/>
🌴️ An efficient Reflection API for the Android platform built in Kotlin.
<br/>
[![GitHub license](https://img.shields.io/github/license/HighCapable/YukiReflection?color=blue&style=flat-square)](https://github.com/HighCapable/YukiReflection/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/HighCapable/YukiReflection?display_name=release&logo=github&color=green&style=flat-square)](https://github.com/HighCapable/YukiReflection/releases)
[![Telegram](https://img.shields.io/badge/discussion-Telegram-blue.svg?logo=telegram&style=flat-square)](https://t.me/YukiReflection)
[![Telegram](https://img.shields.io/badge/discussion%20dev-Telegram-blue.svg?logo=telegram&style=flat-square)](https://t.me/HighCapable_Dev)
[![QQ](https://img.shields.io/badge/discussion%20dev-QQ-blue.svg?logo=tencent-qq&logoColor=red&style=flat-square)](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
English | [简体中文](https://github.com/fankes/YukiReflection/blob/master/README-zh-CN.md)
<img src="img-src/icon.png" width = "100" height = "100" alt="LOGO"/>
🌴️ An efficient Reflection API for Java and Android built in Kotlin.
English | [简体中文](README-zh-CN.md)
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
This project belongs to the above-mentioned organization, **click the link above to follow this organization** and discover more good projects.
## 🚨 Maintenance of this project has been stopped
The `YukiReflection` project has been deprecated due to many unsolved black box issues, so we no longer recommend anyone to use it.
Please now migrate to the brand new design [KavaRef](https://github.com/HighCapable/KavaRef).
## What's this
- This is a concise and efficient Reflection API rebuilt based on Java's native Reflection API using Kotlin, and it is also the core function
being used by [YukiHookAPI](https://github.com/fankes/YukiHookAPI)
- The name is taken from ["ももくり" heroine Yuki Kurihara](https://www.bilibili.com/bangumi/play/ss5016)
This is a concise and efficient Reflection API rebuilt based on Java's native Reflection API using Kotlin,
and it is also the core function being used by [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI).
## What it can do
- Instead of Java's native Reflection API, use a more user-friendly language to implement a more complete set of reflection solutions
- Use annotations to declare classes, methods, and fields that need reflection, construct a `stub`, and call directly to achieve the same
function as the Reflection API, which is more elegant and efficient (under development, and it is expected to gradually implement this function
later)
The name is taken from ["ももくり" heroine Yuki Kurihara](https://www.bilibili.com/bangumi/play/ss5016).
## Get Started
- [Click here](https://fankes.github.io/YukiReflection/en/) go to the documentation page for more detailed tutorials and content.
[Click here](https://highcapable.github.io/YukiReflection/en/) go to the documentation page for more detailed tutorials and content.
## Contacts
## Promotion
- [Follow us on Telegram](https://t.me/YukiReflection)
## Features
If you like the `YukiReflection` project, we welcome you to make a **PR** in this project, any suggestions for improvement and new features.
## Cooperations
The following are projects that have collaborated and are using `YukiReflection`.
| Repository | Developer |
|------------------------------------------------------|------------------------------------------|
| [YukiHookAPI](https://github.com/fankes/YukiHookAPI) | [fankesyooni](https://github.com/fankes) |
Are you also using `YukiReflection`? Come and **PR** to add your repository to the list above (private repositories do not need to indicate web
links).
<!--suppress HtmlDeprecatedAttribute -->
<div align="center">
<h2>Hey, please stay! 👋</h2>
<h3>Here are related projects such as Android development tools, UI design, Gradle plugins, Xposed Modules and practical software. </h3>
<h3>If the project below can help you, please give me a star! </h3>
<h3>All projects are free, open source, and follow the corresponding open source license agreement. </h3>
<h1><a href="https://github.com/fankes/fankes/blob/main/project-promote/README.md">→ To see more about my projects, please click here ←</a></h1>
</div>
## Star History
![Star History Chart](https://api.star-history.com/svg?repos=fankes/YukiReflection&type=Date)
![Star History Chart](https://api.star-history.com/svg?repos=HighCapable/YukiReflection&type=Date)
## License
- [MIT](https://choosealicense.com/licenses/mit)
- [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
```
MIT License
Apache License Version 2.0
Copyright (C) 2019-2023 HighCapable
Copyright (C) 2019 HighCapable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
https://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
Copyright © 2019-2023 HighCapable
Copyright © 2019 HighCapable

View File

@@ -1,63 +0,0 @@
import groovy.json.JsonSlurper
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
id 'org.jetbrains.kotlin.jvm' version '1.8.20' apply false
}
ext {
android = [
compileSdk: 33,
minSdk : 21,
targetSdk : 33
]
app = [
versionName: 'universal',
versionCode: 1
]
maven = [
developer : [
id : '0',
user : 'fankesyooni',
email: 'qzmmcn@163.com'
],
repository : [
groupId : 'com.highcapable.yukireflection',
apiVersion : [
name: '1.0.1',
code: 2
],
name : 'YukiReflection',
description: 'An efficient Reflection API for the Android platform built in Kotlin.',
website : 'https://github.com/fankes/YukiReflection',
licence : [
name: 'MIT License',
url : 'https://github.com/fankes/YukiReflection/blob/master/LICENSE'
]
],
configurations: [
githubConnection : 'scm:git:git://github.com/path/to/repo.git',
githubDeveloperConnection: 'scm:git:ssh://github.com/path/to/repo.git',
githubUrl : 'https://github.com/path/to/repo',
ossName : 'OSSRH',
ossUrl : 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
]
]
}
/**
* 获取 Maven 授权信息 - 用于 Maven 的提交
* @param childProjectDir 子项目的目录
* @return [Object]
*/
@SuppressWarnings('unused')
static Object getMavenCredentials(File childProjectDir) {
def slurper = new JsonSlurper()
try {
return slurper.parse(new File("${childProjectDir.getParent()}/.maven/credentials.json"))
} catch (Throwable ignored) {
return slurper.parseText('{"username":"-NEEDED-","password":"-NEEDED-"}')
}
}

7
build.gradle.kts Normal file
View File

@@ -0,0 +1,7 @@
plugins {
autowire(libs.plugins.android.application) apply false
autowire(libs.plugins.kotlin.jvm) apply false
autowire(libs.plugins.kotlin.android) apply false
autowire(libs.plugins.jetbrains.compose) apply false
autowire(libs.plugins.compose.compiler) apply false
}

1
demo-app/.gitignore vendored
View File

@@ -1 +0,0 @@
/build

View File

@@ -1,57 +0,0 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.highcapable.yukireflection.demo_app'
compileSdk rootProject.ext.android.compileSdk
defaultConfig {
applicationId 'com.highcapable.yukireflection.demo_app'
minSdk rootProject.ext.android.minSdk
targetSdk rootProject.ext.android.targetSdk
versionCode rootProject.ext.app.versionCode
versionName rootProject.ext.app.versionName
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
freeCompilerArgs = [
'-Xno-param-assertions',
'-Xno-call-assertions',
'-Xno-receiver-assertions'
]
}
lintOptions {
checkReleaseBuilds false
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation project(':yukireflection')
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

View File

@@ -1,21 +0,0 @@
package com.highcapable.yukireflection.demo_app.test;
@SuppressWarnings("FieldMayBeFinal")
public class Main {
private static String staticContent = "I am static!";
private final String content;
public Main(String content) {
this.content = content;
}
public String getContent() {
return content;
}
public static String getStaticContent() {
return staticContent;
}
}

View File

@@ -1,77 +0,0 @@
/*
* YukiReflection - An efficient Reflection API for the Android platform built in Kotlin.
* Copyright (C) 2019-2023 HighCapable
* https://github.com/fankes/YukiReflection
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* This file is Created by fankes on 2023/1/21.
*/
@file:Suppress("SetTextI18n", "UsePropertyAccessSyntax")
package com.highcapable.yukireflection.demo_app.ui
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.highcapable.yukireflection.YukiReflection
import com.highcapable.yukireflection.demo_app.databinding.ActivityMainBinding
import com.highcapable.yukireflection.demo_app.test.Main
import com.highcapable.yukireflection.factory.*
import com.highcapable.yukireflection.type.java.StringClass
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
ActivityMainBinding.inflate(layoutInflater).apply {
setContentView(root)
yukiReflectionVersionText.text = "YukiReflection Version${YukiReflection.API_VERSION_NAME}(${YukiReflection.API_VERSION_CODE})"
testObjectDirectlyButton.setOnClickListener {
tipText.text = Main("I am directly call of new object").getContent()
}
testObjectReflectionButton.setOnClickListener {
tipText.text =
classOf<Main>().buildOf("I am reflection call of new object") { param(StringClass) }
?.current()
?.method {
name = "getContent"
emptyParam()
}?.string() ?: ""
}
testStaticDirectlyButton.setOnClickListener {
tipText.text = Main.getStaticContent()
}
testStaticReflectionButton.setOnClickListener {
tipText.text = classOf<Main>().method {
name = "getStaticContent"
modifiers { isStatic }
}.get().string()
}
testModifyStaticReflectionButton.setOnClickListener {
classOf<Main>().field {
name = "staticContent"
modifiers { isStatic }
}.get().set("I am static! Modified by reflection")
tipText.text = "Field is modified success"
}
}
}
}

View File

@@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:context=".ui.MainActivity"
tools:ignore="HardcodedText">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Using functions below to test"
android:textSize="18sp" />
<TextView
android:id="@+id/tip_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="35dp"
android:text="Waiting for your operation"
android:textSize="18sp" />
<Button
android:id="@+id/test_object_directly_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Create an Object and Call Directly" />
<Button
android:id="@+id/test_object_reflection_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Create an Object and Call Reflection" />
<Button
android:id="@+id/test_static_directly_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Get Static and Call Directly" />
<Button
android:id="@+id/test_static_reflection_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="Get Static and Call Reflection" />
<Button
android:id="@+id/test_modify_static_reflection_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Modified Static Field Using Reflection" />
<TextView
android:id="@+id/yuki_reflection_version_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:alpha="0.55"
android:ellipsize="end"
android:gravity="center|start"
android:singleLine="true"
android:textSize="15sp" />
</LinearLayout>

View File

@@ -1,3 +1,4 @@
node_modules
src/.vuepress/.cache
src/.vuepress/.temp
/node_modules
/src/.vuepress/.cache
/src/.vuepress/.temp
/dist

View File

View File

@@ -1,15 +1,16 @@
{
"name": "yukireflection_docs",
"license": "MIT",
"license": "Apache-2.0",
"devDependencies": {
"@mr-hope/vuepress-plugin-copy-code": "^1.30.0",
"@vuepress/plugin-prismjs": "^2.0.0-beta.51",
"@vuepress/plugin-search": "^2.0.0-beta.51",
"@vuepress/plugin-shiki": "^2.0.0-beta.51",
"vuepress": "^2.0.0-beta.51"
"@vuepress/plugin-prismjs": "2.0.0-rc.0",
"@vuepress/plugin-search": "2.0.0-rc.0",
"@vuepress/plugin-shiki": "2.0.0-rc.0",
"vuepress": "2.0.0-rc.0"
},
"scripts": {
"docs:dev": "vuepress dev src",
"docs:build": "vuepress build src"
"docs:build": "vuepress build src",
"docs:build-gh-pages": "vuepress build src && touch dist/.nojekyll"
}
}

View File

@@ -0,0 +1,38 @@
import { defineClientConfig } from '@vuepress/client'
import { h, onMounted, watch } from 'vue'
import DeprecatedBanner from './components/DeprecatedBanner.vue'
import { useRoute } from 'vue-router'
export default defineClientConfig({
rootComponents: [
() => h(DeprecatedBanner)
],
setup() {
const route = useRoute()
const adjustLayout = () => {
requestAnimationFrame(() => {
const banner = document.querySelector('.deprecated-banner') as HTMLElement
const height = banner?.clientHeight ?? 0
const themeContainer = document.querySelector('.theme-container') as HTMLElement
const navbar = document.querySelector('.navbar') as HTMLElement
const sidebar = document.querySelector('.sidebar') as HTMLElement
if (height > 0) {
if (themeContainer) themeContainer.style.paddingTop = `${height}px`
if (navbar) navbar.style.marginTop = `${height}px`
if (sidebar) sidebar.style.marginTop = `${height}px`
}
})
}
onMounted(() => {
adjustLayout()
})
watch(() => route.path, () => {
adjustLayout()
})
}
})

View File

@@ -0,0 +1,35 @@
<template>
<div class="deprecated-banner">
YukiReflection is deprecated, Start trying <a href="https://github.com/HighCapable/KavaRef" target="_blank"
rel="noopener">KavaRef</a> now!&nbsp
YukiReflection 已被弃用立即尝试 <a href="https://github.com/HighCapable/KavaRef/blob/main/README-zh-CN.md"
target="_blank" rel="noopener">KavaRef</a>
</div>
</template>
<style scoped>
.deprecated-banner {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #ffdddd;
color: #a00000;
text-align: center;
padding: 12px 24px;
font-weight: bold;
font-size: 16px;
z-index: 9999;
}
.deprecated-banner a {
color: #a00000;
text-decoration: underline;
font-weight: bold;
}
.deprecated-banner a:hover {
color: #600000;
}
</style>

View File

@@ -25,7 +25,7 @@ export default {
navbar: navBarItems['/en/'],
selectLanguageText: 'English (US)',
selectLanguageName: 'English',
editLinkText: 'Edit this page on Github',
editLinkText: 'Edit this page on GitHub',
tip: 'Tips',
warning: 'Notice',
danger: 'Pay Attention',
@@ -34,7 +34,7 @@ export default {
navbar: navBarItems['/zh-cn/'],
selectLanguageText: '简体中文 (CN)',
selectLanguageName: '简体中文',
editLinkText: '在 Github 上编辑此页',
editLinkText: '在 GitHub 上编辑此页',
notFound: ['这里什么都没有', '我们怎么到这来了?', '这是一个 404 页面', '看起来我们进入了错误的链接'],
backToHome: '回到首页',
contributorsText: '贡献者',

View File

@@ -23,6 +23,7 @@ const navigationLinks = {
baseApiPath + 'type/android/ViewTypeFactory',
baseApiPath + 'type/java/VariableTypeFactory',
baseApiPath + 'type/defined/DefinedTypeFactory',
baseApiPath + 'log/YLog',
baseApiPath + 'factory/ReflectionFactory',
baseApiPath + 'finder/members/MethodFinder',
baseApiPath + 'finder/members/ConstructorFinder',
@@ -52,7 +53,7 @@ const navigationLinks = {
export const configs = {
dev: {
dest: '../docs/',
dest: 'dist',
port: 9000
},
website: {
@@ -63,16 +64,16 @@ export const configs = {
locales: {
'/en/': {
lang: 'en-US',
description: 'An efficient Reflection API for the Android platform built in Kotlin'
description: 'An efficient Reflection API for Java and Android built in Kotlin'
},
'/zh-cn/': {
lang: 'zh-CN',
description: '一个使用 Kotlin 构建的 Android 平台高效反射 API'
description: '一个使用 Kotlin 构建的用于 Java 和 Android 平台高效反射 API'
}
}
},
github: {
repo: 'https://github.com/fankes/YukiReflection',
repo: 'https://github.com/HighCapable/YukiReflection',
branch: 'master',
dir: 'docs-source/src'
}

View File

@@ -1,33 +1,27 @@
# About this Document
# About This Document
> This document is powered by [VuePress](https://v2.vuepress.vuejs.org/en).
## License
[The MIT License (MIT)](https://github.com/fankes/YukiReflection/blob/master/LICENSE)
[Apache-2.0](https://github.com/HighCapable/YukiReflection/blob/master/LICENSE)
```:no-line-numbers
MIT License
Apache License Version 2.0
Copyright (C) 2019-2023 HighCapable
Copyright (C) 2019 HighCapable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
https://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
Copyright © 2019-2023 HighCapable
Copyright © 2019 HighCapable

View File

@@ -16,9 +16,30 @@ Time zone of version release date: **UTC+8**
:::
### 1.0.1 | 2023.04.16 &ensp;<Badge type="tip" text="latest" vertical="middle" />
### 1.0.3 | 2023.10.07 &ensp;<Badge type="tip" text="latest" vertical="middle" />
- Change the type of dependent library from **Java Library** (jar) to **Android Library** (aar)
- The license agreement has been changed from `MIT` to `Apache-2.0`, subsequent versions will be distributed under this license agreement, you should change the relevant license agreement after using this version
- Change the type of dependency library from **Android Library** (aar) back to **Java Library** (jar)
- Adapt and support the native Java platform (some functions are only available on the Android platform)
- Fixed [fix get interfaces of class](https://github.com/HighCapable/YukiHookAPI/pull/38) issue and merged into `YukiReflection`
- Deprecated ~~`isAllowPrintingLogs`~~, please start using the `debugLog` method
- Added `YukiReflection.TAG`
- Obsolete ~~`YukiReflection.API_VERSION_NAME`~~, ~~`YukiReflection.API_VERSION_CODE`~~, merged into `YukiReflection.VERSION`
- Refactored `remendy` functionality in find methods, which now prints exceptions in steps
- The multi-method find result type is changed from `HashSet` to `MutableList`
- Added `method()`, `constructor()`, `field()` to directly obtain all object functions in the class
- `constructor()` no longer behaves like `constructor { emptyParam() }`
- Added `lazyClass` and `lazyClassOrNull` methods to lazily load `Class`
### 1.0.2 | 2023.04.25 &ensp;<Badge type="warning" text="stale" vertical="middle" />
- Fixed a critical issue where the `Member` cache did not take effect and persistent storage eventually caused app out of memory (OOM), thanks to [Art-Chen](https://github.com/Art-Chen)
- Remove the direct cache function of `Member` and deprecated ~~`YukiReflection.Configs.isEnableMemberCache`~~, keep the cache function of `Class`
- Modified finder to `Sequence`, optimize the finding speed and performance of `Member`
### 1.0.1 | 2023.04.16 &ensp;<Badge type="warning" text="stale" vertical="middle" />
- Change the type of dependency library from **Java Library** (jar) to **Android Library** (aar)
- Removed wrong `Class` object declaration in Android `type`
### 1.0.0 | 2023.01.26 &ensp;<Badge type="warning" text="stale" vertical="middle" />

View File

@@ -2,12 +2,15 @@
> If you have any questions in use, or have any constructive suggestions, you can contact us.
Join us [Click to join Telegram group](https://t.me/YukiReflection)
Join our developers group.
Find me on **Twitter** [@fankesyooni](https://twitter.com/fankesyooni)
- [Click to join Telegram group](https://t.me/YukiReflection)
- [Click to join Telegram group (Developer)](https://t.me/HighCapable_Dev)
Find me on **Twitter** [@fankesyooni](https://twitter.com/fankesyooni).
## Help with Maintenance
Thank you for choosing and using `YukiReflection`.
If you have code-related suggestions and requests, you can submit a Pull Request on Github.
If you have code-related suggestions and requests, you can submit a Pull Request on GitHub.

View File

@@ -8,9 +8,9 @@
### Automatically Generate Reflection Code
Use `stub` to create a `Kotlin` class, and declare the parameters in it, as well as its different states in each version.
Use `stub` to create a Kotlin class, and declare the parameters in it, as well as its different states in each version.
For example, the `Java` class below is the target class we need to reflect.
For example, the Java class below is the target class we need to reflect.
> The following example
@@ -56,7 +56,7 @@ classOf<MyClass>().buildOf().current {
}
```
The function to be implemented at present can be directly defined as the following `Kotlin` class using the reflection function.
The function to be implemented at present can be directly defined as the following Kotlin class using the reflection function.
> The following example
@@ -80,7 +80,7 @@ class MyClass {
}
```
Then we can directly call this defined `Kotlin` class to implement the reflection function, and the API will automatically generate the reflection code according to the annotation.
Then we can directly call this defined Kotlin class to implement the reflection function, and the API will automatically generate the reflection code according to the annotation.
> The following example
@@ -101,4 +101,119 @@ MyClass().also {
The above functions may change after the actual release, and the functions of the actual version shall prevail.
:::
### Automatically Generate Directly Called Class Objects
In Kotlin, the way to represent Java class objects is `YourObject::class.java`.
This writing method is usually very long and will be very unsightly when used extensively during reflection.
In the existing version, we have built-in commonly used `Class` objects, but this will increase the size of dependencies, and these objects may not be used in most cases.
For example, `StringClass`, `IntType`, etc., these objects are built in `YukiReflection`.
So we plan to add a function in the future, which can use `properties` to create a list of `Class` objects that need to be generated,
and generate these `Class` objects in sequence through the Gradle plugin.
`Class` objects of primitive types such as those mentioned above will still be built into `YukiReflection`,
and the remaining `Class` objects need to be defined by yourself.
The generated name specification is **Class Name + Class**.
In order to prevent package name conflicts, you can control the sub-package name of the generated `Class` object.
In the configuration file, you don't need to add `Class` as a suffix.
You can define the generated root package name in the Gradle plugin, which defaults to `com.highcapable.yukireflection.generated.classes`.
> The following example
```properties
# The most basic way to define is to write the name directly
# Will be generated to com.highcapable.yukireflection.generated.classes.BundleClass
android.os.Bundle=Bundle
# You can use the "." form in front to define the prefixed subpackage name
# For example, we want to define this class to the desired package name
# Will be generated to com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
android.os.Bundle=myandroid.myos.Bundle
# You can also not fill in the key value content, which will use the key value name
# as the defined package name and class name
# Will be generated to com.highcapable.yukireflection.generated.classes.android.os.BundleClass
android.os.Bundle
```
The approximate code form of the `Class` object generated by the above method is as follows.
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
// Used with default ClassLoader
val BundleClass: Class<*> = "android.os.Bundle".toClass()
// Used when ClassLoader is specified
fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
```
Maybe this `Class` may not be obtained in some cases.
In this case, you can refer to the following configuration method.
> The following example
```properties
# Add "?" after the key value to define a nullable Class object
android.os.Bundle?
```
The approximate code form of the `Class` object generated by the above method is as follows.
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
// Used with default ClassLoader
val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
// Used when ClassLoader is specified
fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
```
If this `Class` object can be referenced by direct call, you can refer to the following configuration method at this time.
> The following example
```properties
# Add "!!" after the key value to define a Class object that can be called directly
android.os.Bundle!!
```
The approximate code form of the `Class` object generated by the above method is as follows.
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
import android.os.Bundle
// Used with default ClassLoader
val BundleClass: Class<Bundle> = classOf<Bundle>()
// Used when ClassLoader is specified
fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
```
With the generated `Class` object, we can happily use `YukiReflection` for reflection.
> The following example
```kotlin
method {
name = "onCreate"
param(BundleClass)
}
```
::: tip
The above functions may change after the actual release, and the functions of the actual version shall prevail.
:::

View File

@@ -70,6 +70,52 @@ For more functions, please refer to [classOf](../api/public/com/highcapable/yuki
:::
### Lazy Loading
Suppose we want to get a `Class` that cannot be called directly, but we do not need this `Class` immediately.
At this time, you can use `lazyClass` to complete this function.
> The following example
```kotlin
// Lazy loading of this Class
val instance by lazyClass("com.demo.Test")
// Customize the ClassLoader where the Class is located
val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
val instance by lazyClass("com.demo.Test") { customClassLoader }
// Call this Class at the appropriate time
instance.method {
// ...
}
```
If the current `Class` does not exist, using the above method will throw an exception.
If you are not sure whether `Class` exists, you can refer to the following solution.
> The following example
```kotlin
// Lazy loading of this Class
// If not available, the result will be null but no exception will be thrown
val instance by lazyClassOrNull("com.demo.Test")
// Customize the ClassLoader where the Class is located
val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
// If not available, the result will be null but no exception will be thrown
val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
// Call this Class at the appropriate time
instance?.method {
// ...
}
```
::: tip
For more functions, please refer to [lazyClass](../public/com/highcapable/yukireflection/factory/ReflectionFactory#lazyclass-method), [lazyClassOrNull](../public/com/highcapable/yukireflection/factory/ReflectionFactory#lazyclassornull-method) methods.
:::
### Existential Judgment
Suppose we want to determine whether a `Class` exists.
@@ -126,6 +172,8 @@ At this point, there is `DexClassFinder`, its role is to determine the instance
::: warning
**This feature is only available on the Android platform.**
At present, the function of **DexClassFinder** is still in the experimental stage.
Since the search function is only implemented through the Java layer, the performance may not reach the optimal level when there are too many current app's **Class**.
@@ -142,6 +190,14 @@ Please note that the more the same type **Class** is matched, the slower the spe
:::
::: danger
After **YukiHookAPI** **2.0.0** released, this function will be deprecated and will be removed directly from **YukiReflection**.
We welcome all developers to start using [DexKit](https://github.com/LuckyPray/DexKit), which is a high-performance runtime parsing library for **Dex** implemented in C++, which is more efficient than the Java layer in terms of performance, efficient and excellent, it is still in the development stage, your valuable suggestions are welcome.
:::
#### Get Started
Below is a simple usage example.
@@ -1148,7 +1204,7 @@ instance.current {
name = "stop"
emptyParam()
}.call()
// Note that because current() returns the CurrentClass object itself
// Note that because current() returns the CurrentClass object itself
// It CANNOT BE CALLED like the following
instance.current().current()
```
@@ -1527,11 +1583,7 @@ For more functions, please refer to [CurrentClass.generic](../api/public/com/hig
#### Restrictive Find Conditions
::: danger
In find conditions you can only use **index** function once except **order**.
:::
In find conditions you can <u>**only**</u> use `index` function once except `order`.
> The following example
@@ -1539,7 +1591,7 @@ In find conditions you can only use **index** function once except **order**.
method {
name = "test"
param(BooleanType).index(num = 2)
// Wrong usage, please keep only one index method
// Wrong usage, please keep only one index method
returnType(StringClass).index(num = 1)
}
```
@@ -1558,12 +1610,8 @@ method {
#### Necessary Find Conditions
::: danger
In common method find conditions, <u>**even methods without parameters need to set find conditions**</u>.
:::
Suppose we have the following `Class`.
> The following example
@@ -1613,9 +1661,13 @@ TestFoo::class.java.method {
At this point, the above example will perfectly match the `public void foo()` method.
#### Abbreviated Find Conditions
::: tip Compatibility Notes
> In the construction method find conditions, <u>**constructors without parameters do not need to fill in the find conditions**</u>.
In the past historical versions of the API, it was allowed to match the method without writing the default matching no-parameter method, but the latest version has corrected this problem, please make sure that you are using the latest API version.
:::
In the find conditions for constructors, <u>**even constructors without parameters need to set find conditions**</u>.
Suppose we have the following `Class`.
@@ -1630,7 +1682,7 @@ public class TestFoo {
}
```
We want to get the `public TestFoo()` constructor, which can be written as follows.
To get the `public TestFoo()` constructor, we must write it in the following form.
> The following example
@@ -1638,23 +1690,57 @@ We want to get the `public TestFoo()` constructor, which can be written as follo
TestFoo::class.java.constructor { emptyParam() }
```
The above example can successfully obtain the `public TestFoo()` constructor, but it feels a bit cumbersome.
The above example can successfully obtain the `public TestFoo()` constructor.
Unlike normal methods, since the constructor does not need to consider the `name`, when the constructor has no parameters, we can omit the `emptyParam` parameter.
If you write `constructor()` and miss `emptyParam()`, the result found at this time will be the first one in bytecode order, <u>**may not be parameterless** </u>.
::: tip Compatibility Notes
In past historical versions of the API, if the constructor does not fill in any search parameters, the constructor will not be found directly.
<u>**This is a BUG and has been fixed in the latest version**</u>, please make sure you are using the latest API version.
:::
::: danger API Behavior Changes
In **1.2.0** and later versions, the behavior of **constructor()** is no longer **constructor { emptyParam() }** but **constructor {}**, please pay attention to the behavior change reasonably adjust the find parameters.
:::
#### No Find Conditions
Without setting find conditions, using `field()`, `constructor()`, `method()` will return all members under the current `Class`.
Using `get(...)` or `give()` will only get the first bit in bytecode order.
> The following example
```kotlin
TestFoo::class.java.constructor()
Test::class.java.field().get(...)
Test::class.java.method().give()
```
If you want to get all members, you can use `all(...)` or `giveAll()`
> The following example
```kotlin
Test::class.java.field().all(...)
Test::class.java.method().giveAll()
```
::: tip Compatibility Notes
In past historical versions of the API, failure to set find conditions will throw an exception.
This feature was added in **1.2.0** and later versions.
:::
#### Bytecode Type
::: danger
In the bytecode call result, the **cast** method can only specify the type corresponding to the bytecode.
:::
In the bytecode call result, the **cast** method can <u>**only**</u> specify the type corresponding to the bytecode.
For example we want to get a field of type `Boolean` and cast it to `String`.
@@ -1666,7 +1752,7 @@ The following is the wrong way to use it.
field {
name = "test"
type = BooleanType
}.get().string() // Wrong usage, must be cast to the bytecode target type
}.get().string() // Wrong usage, must be cast to the bytecode target type
```
The following is the correct way to use it.
@@ -1693,7 +1779,7 @@ field {
}
```
Expressing the type of `Boolean::class.javaPrimitiveType` in `Kotlin` is very long and inconvenient.
Expressing the type of `Boolean::class.javaPrimitiveType` in Kotlin is very long and inconvenient.
Therefore, `YukiReflection` encapsulates common type calls for developers, including Android related types and Java common types and **primitive type keywords**.
@@ -1744,7 +1830,7 @@ At the same time, they all have their own corresponding package types in Java, s
Similarly, arrays also have corresponding wrapper types, which also need to be distinguished from Java **primitive type keywords**.
For example, the encapsulation type of **byte[]** is **ByteArrayType** or **ArrayClass(ByteType)**, and the encapsulation type of **Byte[]** is **ByteArrayClass** or **ArrayClass(ByteClass )**, these types are also <u>**unequal**</u>.
For example, the encapsulation type of **byte[]** is **ByteArrayType** or **ArrayClass(ByteType)**, and the encapsulation type of **Byte[]** is **ByteArrayClass** or **ArrayClass(ByteClass)**, these types are also <u>**unequal**</u>.
:::

View File

@@ -24,33 +24,53 @@ object YukiReflection
> 这是 `YukiReflection` 的装载调用类。
## API_VERSION_NAME <span class="symbol">- field</span>
## TAG <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val API_VERSION_NAME: String
const val TAG: String
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `added`
**Function Illustrate**
> 获取当前 `YukiReflection` 的名称 (标签)。
## VERSION <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val VERSION: String
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 获取当前 `YukiReflection` 的版本。
## API_VERSION_CODE <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val API_VERSION_CODE: Int
```
<h2 class="deprecated">API_VERSION_NAME - field</h2>
**Change Records**
`v1.0.0` `first`
**Function Illustrate**
`v1.0.3` `deprecated`
> 获取当前 `YukiReflection` 的版本号。
不再区分版本名称和版本号,请迁移到 `VERSION`
<h2 class="deprecated">API_VERSION_CODE - field</h2>
**Change Records**
`v1.0.0` `first`
`v1.0.3` `deprecated`
不再区分版本名称和版本号,请迁移到 `VERSION`
## Configs <span class="symbol">- object</span>
@@ -66,23 +86,29 @@ object Configs
> 对 API 相关功能的配置类。
### debugTag <span class="symbol">- field</span>
### debugLog <span class="symbol">- method</span>
```kotlin:no-line-numbers
var debugTag: String
inline fun debugLog(initiate: YLog.Configs.() -> Unit)
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 配置 `YLog.Configs` 相关参数。
<h3 class="deprecated">debugTag - field</h3>
**Change Records**
`v1.0.0` `first`
**Function Illustrate**
`v1.0.3` `deprecated`
> 这是一个调试日志的全局标识。
默认文案为 `YukiReflection`。
你可以修改为你自己的文案。
请迁移到 `debugLog`
### isDebug <span class="symbol">- field</span>
@@ -100,51 +126,25 @@ var isDebug: Boolean
默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。
请过滤 `debugTag` 即可找到每条日志。
### isAllowPrintingLogs <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isAllowPrintingLogs: Boolean
```
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
**Change Records**
`v1.0.0` `first`
**Function Illustrate**
`v1.0.3` `deprecated`
> 是否启用调试日志的输出功能。
请迁移到 `debugLog`
::: warning
关闭后将会停用 **YukiReflection** 对全部日志的输出。
:::
### isEnableMemberCache <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isEnableMemberCache: Boolean
```
<h3 class="deprecated">isEnableMemberCache - field</h3>
**Change Records**
`v1.0.0` `first`
**Function Illustrate**
`v1.0.2` `deprecated`
> 是否启用 `Member` 缓存功能
为防止 `Member` 复用过高造成的系统 GC 问题,此功能默认启用。
启用后会缓存已经找到的 `Method`、`Constructor`、`Field`。
缓存的 `Member` 都将处于 `ReflectsCacheStore` 的全局静态实例中。
推荐使用 `MethodFinder`、`ConstructorFinder`、`FieldFinder` 来获取 `Member`。
除非缓存的 `Member` 发生了混淆的问题,例如使用 R8 混淆后的 APP 的目标 `Member`,否则建议启用。
`Member` 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题
## configs <span class="symbol">- method</span>
@@ -158,6 +158,6 @@ inline fun configs(initiate: Configs.() -> Unit)
**Function Illustrate**
> 对 `Configs` 类实现了一个 `lambda` 方法体。
> 对 `Configs` 类实现了一个 **lambda** 方法体。
你可以轻松地调用它进行配置。

View File

@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
# CurrentClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
class CurrentClass internal constructor(internal val classSet: Class<*>, internal val instance: Any)
class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
```
**Change Records**
@@ -129,7 +129,7 @@ inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
## SuperClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class SuperClass internal constructor(internal val superClassSet: Class<*>)
inner class SuperClass internal constructor(private val superClassSet: Class<*>)
```
**Change Records**

View File

@@ -27,17 +27,27 @@ class GenericClass internal constructor(private val type: ParameterizedType)
## argument <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun argument(index: Int): Class<*>
fun argument(index: Int): Class<*>?
```
```kotlin:no-line-numbers
inline fun <reified T> argument(index: Int): Class<T>
inline fun <reified T> argument(index: Int): Class<T>?
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
方法的返回值可为 `null`
**Function Illustrate**
> 获得泛型参数数组下标的 `Class` 实例。
> 获得泛型参数数组下标的 `Class` 实例。
::: warning
在运行时局部变量的泛型会被擦除,获取不到时将会返回 **null**
:::

View File

@@ -20,6 +20,24 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
> 这是自定义 `Member` 和 `Class` 相关功能的查找匹配以及 `invoke` 的封装类。
## LazyClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
open class LazyClass<T> internal constructor(
private val instance: Any,
private val initialize: Boolean,
private val loader: ClassLoaderInitializer?
)
```
**Change Records**
`v1.2.0` `added`
**Function Illustrate**
> 懒装载 `Class` 实例。
## ClassLoader.listOfClasses <span class="symbol">- ext-method</span>
```kotlin:no-line-numbers
@@ -353,7 +371,7 @@ inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class
**Function Example**
我们要获取一个 `Class` 在 `Kotlin` 下不通过反射时应该这样做。
我们要获取一个 `Class` 在 Kotlin 下不通过反射时应该这样做。
> The following example
@@ -378,6 +396,50 @@ val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoade
classOf<DemoClass>(customClassLoader)
```
## lazyClass <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
```
```kotlin:no-line-numbers
inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
```
```kotlin:no-line-numbers
fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 懒装载 `Class`。
## lazyClassOrNull <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
```
```kotlin:no-line-numbers
inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
```
```kotlin:no-line-numbers
fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 懒装载 `Class`。
## String.hasClass <span class="symbol">- ext-method</span>
```kotlin:no-line-numbers

View File

@@ -442,7 +442,7 @@ fun enclosing(vararg name: String)
## FromPackageRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class FromPackageRules internal constructor(private val packages: ArrayList<ClassRulesData.PackageRulesData>)
inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
```
**Change Records**
@@ -626,20 +626,24 @@ fun get(): Class<*>?
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(): HashSet<Class<*>>
fun all(): MutableList<Class<*>>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
返回值类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 得到 `Class` 本身数组。
返回全部查找条件匹配的多个 `Class` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
若你设置了 `async` 请使用 [waitAll](#waitall-method) 方法。
@@ -686,20 +690,24 @@ fun wait(result: (Class<*>?) -> Unit): Result
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(result: (HashSet<Class<*>>) -> Unit): Result
fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
`result` 类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 得到 `Class` 本身数组 (异步)。
回调全部查找条件匹配的多个 `Class` 实例。
在查找条件找不到任何结果的时候将回调空的 `HashSet`。
在查找条件找不到任何结果的时候将回调空的 `MutableList`。
你需要设置 `async` 后此方法才会被回调,否则请使用 [all](#all-method) 方法。

View File

@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
# ConstructorRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class ConstructorRules internal constructor(internal val rulesData: ConstructorRulesData) : BaseRules
class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
```
**Change Records**

View File

@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
# FieldRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class FieldRules internal constructor(internal val rulesData: FieldRulesData) : BaseRules
class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
```
**Change Records**

View File

@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
# MemberRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class MemberRules internal constructor(internal val rulesData: MemberRulesData) : BaseRules
class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
```
**Change Records**

View File

@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
# MethodRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class MethodRules internal constructor(internal val rulesData: MethodRulesData) : BaseRules
class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
```
**Change Records**

View File

@@ -267,13 +267,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Constructor<*>>.() -> Unit)
fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 当在 `RemedyPlan` 中找到结果时。
@@ -322,7 +326,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**Function Example**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> The following example
@@ -398,13 +402,17 @@ constructor {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(): ArrayList<Instance>
fun all(): MutableList<Instance>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
返回值类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Constructor` 实例处理类数组。
@@ -446,20 +454,24 @@ fun give(): Constructor<*>?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Constructor<*>>
fun giveAll(): MutableList<Constructor<*>>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
返回值类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 得到 `Constructor` 本身数组。
返回全部查找条件匹配的多个 `Constructor` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -488,13 +500,17 @@ fun wait(initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(initiate: MutableList<Instance>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Constructor` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -253,13 +253,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Field>.() -> Unit)
fun onFind(initiate: MutableList<Field>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 当在 `RemedyPlan` 中找到结果时。
@@ -281,7 +285,7 @@ field {
## Result <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
```
**Change Records**
@@ -308,7 +312,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**Function Example**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> The following example
@@ -368,13 +372,17 @@ field {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(instance: Any?): ArrayList<Instance>
fun all(instance: Any?): MutableList<Instance>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
返回值类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Field` 实例处理类数组。
@@ -416,20 +424,24 @@ fun give(): Field?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Field>
fun giveAll(): MutableList<Field>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
返回值类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 得到 `Field` 本身数组。
返回全部查找条件匹配的多个 `Field` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -458,13 +470,17 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `modified`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Field` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -403,13 +403,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Method>.() -> Unit)
fun onFind(initiate: MutableList<Method>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `修改`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 当在 `RemedyPlan` 中找到结果时。
@@ -431,7 +435,7 @@ method {
## Result <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
```
**Change Records**
@@ -458,7 +462,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**Function Example**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> The following example
@@ -520,13 +524,17 @@ method {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(instance: Any?): ArrayList<Instance>
fun all(instance: Any?): MutableList<Instance>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `修改`
返回值类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Method` 实例处理类数组。
@@ -568,20 +576,24 @@ fun give(): Method?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Method>
fun giveAll(): MutableList<Method>
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `修改`
返回值类型由 `HashSet` 修改为 `MutableList`
**Function Illustrate**
> 得到 `Method` 本身数组。
返回全部查找条件匹配的多个 `Method` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -610,13 +622,17 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
```
**Change Records**
`v1.0.0` `first`
`v1.0.3` `修改`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**Function Illustrate**
> 获得 `Method` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -0,0 +1,75 @@
---
pageClass: code-page
---
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.
:::
# YLog <span class="symbol">- object</span>
```kotlin:no-line-numbers
object YLog
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 全局 Log 管理类。
## Configs <span class="symbol">- object</span>
```kotlin:no-line-numbers
object Configs
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 配置 `YLog`。
### tag <span class="symbol">- field</span>
```kotlin:no-line-numbers
var tag: String
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 这是一个调试日志的全局标识。
默认文案为 `YukiReflection`。
你可以修改为你自己的文案。
### isEnable <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isEnable: Boolean
```
**Change Records**
`v1.0.3` `added`
**Function Illustrate**
> 是否启用调试日志的输出功能。
关闭后将会停用 `YukiReflection` 对全部日志的输出。
当 `isEnable` 关闭后 `YukiReflection.Configs.isDebug` 也将同时关闭。

View File

@@ -20,4 +20,4 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
> 这是一个预置反射类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt) 进行查看。

View File

@@ -20,4 +20,4 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt) 进行查看。

View File

@@ -20,4 +20,4 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt) 进行查看。

View File

@@ -18,6 +18,6 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
**Function Illustrate**
> 这是一个预置反射类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
> 这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt) 进行查看。

View File

@@ -2,21 +2,21 @@
> The basic configuration method of `YukiReflection` is introduced here.
`YukiReflection` can be used directly without some complex configuration, and does not conflict with `Java`'s native Reflection API.
`YukiReflection` can be used directly without some complex configuration, and does not conflict with Java's native Reflection API.
You can configure some functions of `YukiReflection` before using it.
## Get the API Version
## Get the API Tag & Version
You can get the current API version of `YukiReflection` as follows.
You can get the current tag and version of `YukiReflection` as follows.
> The following example
```kotlin
// Get the version name
val versionName = YukiReflection. API_VERSION_NAME
// Get the version code
val versionCode = YukiReflection. API_VERSION_CODE
// Get the tag
val tag = YukiReflection.TAG
// Get the version
val version = YukiReflection.VERSION
```
You can judge the difference between different versions or display it in the about information by obtaining the version.
@@ -42,10 +42,12 @@ Logs inside the API will be printed using this tag.
```kotlin
// Via the configs method
YukiReflection.configs {
debugTag = "YourCustomTag"
debugLog {
tag = "YourCustomTag"
}
}
// Set directly
YukiReflection.Configs.debugTag = "YourCustomTag"
YLog.Configs.tag = "YourCustomTag"
```
### Enable or Disable Debug Mode
@@ -76,27 +78,12 @@ This function is enabled by default, and disable will stop `YukiReflection` outp
```kotlin
// Via the configs method
YukiReflection.configs {
isAllowPrintingLogs = true
debugLog {
isEnable = true
}
}
// Set directly
YukiReflection.Configs.isAllowPrintingLogs = true
```
### Enable or Disable Member Cache
You can enable or disable `Member` caching as follows.
To prevent system GC problems caused by excessive `Member` reuse, this feature is enabled by default.
> The following example
```kotlin
// Via the configs method
YukiReflection.configs {
isEnableMemberCache = true
}
// Set directly
YukiReflection.Configs.isEnableMemberCache = true
YLog.Configs.isEnable = true
```
### Use the configs Method to Configure
@@ -107,10 +94,11 @@ In order to configure multiple features at once, you can directly use the `YukiR
```kotlin
YukiReflection.configs {
debugTag = "YourCustomTag"
debugLog {
tag = "YourCustomTag"
isEnable = true
}
isDebug = true
isAllowPrintingLogs = true
isEnableMemberCache = true
}
```

View File

@@ -29,15 +29,15 @@ A disallowed parameter type was set when looking up methods, constructors, and v
```kotlin
// Find a method
method {
// Invalid type example is set
// Invalid type example is set
param(false, 1, 0)
// Invalid type example is set
// Invalid type example is set
returnType = false
}
// Find a variable
field {
// Invalid type example is set
// Invalid type example is set
type = false
}
```
@@ -102,30 +102,6 @@ Please confirm the `RemedyPlan` parameter you set and the `Class` that exists in
::: danger loggerE
You must set a condition when finding a Method/Constructor/Field
:::
**Abnormal**
No conditions are set when looking for methods, constructors, and variables.
> The following example
```kotlin
method {
// No conditions are set here
}
```
**Solution**
Please complete your search criteria and try again.
###### exception
::: danger loggerE
Can't find this Class in \[**CLASSLOADER**\]: **CONTENT** Generated by YukiReflection#ReflectionTool
:::

View File

@@ -1,34 +1,34 @@
# Introduce
> `YukiReflection` is a Reflection API based on the Android platform.
> `YukiReflection` is a Reflection API based on the Java and Android platform.
## Background
This is a set of simple and efficient Reflection API rebuilt based on `Java` native Reflection API using `Kotlin`.
This is a set of simple and efficient Reflection API rebuilt based on Java native Reflection API using Kotlin.
`YukiReflection` is also the core functionality that [YukiHookAPI](https://github.com/fankes/YukiHookAPI) is using.
`YukiReflection` is also the core functionality that [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) is using.
The name is taken from ["ももくり" heroine Yuki Kurihara](https://www.bilibili.com/bangumi/play/ss5016).
## Usage
`YukiReflection` is fully built with `Kotlin` `lambda` syntax.
`YukiReflection` is fully built with Kotlin **lambda** syntax.
It can replace [Java's native Reflection API](https://www.oracle.com/technical-resources/articles/java/javareflection.html) and implement a more complete reflection solution in a more human-friendly language.
## Language Requirement
Please use `Kotlin`, the code composition of the API part is also compatible with `Java`, but the implementation of the basic reflection scene **may not be used at all**.
Please use Kotlin, the code composition of the API part is also compatible with Java, but the implementation of the basic reflection scene **may not be used at all**.
All Demo sample codes in the document will be described using `Kotlin`, if you dont know how to use `Kotlin` at all, you may not be able to use `YukiReflection`.
All Demo sample codes in the document will be described using Kotlin, if you dont know how to use Kotlin at all, you may not be able to use `YukiReflection`.
## Source of Inspiration
`YukiReflection` was originally the core function integrated in the [YukiHookAPI](https://github.com/fankes/YukiHookAPI) project, and now it is decoupled so that this Reflection API can be used in any Android platform project.
`YukiReflection` was originally the core function integrated in the [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) project, and now it is decoupled so that this Reflection API can be used in any Java and Android platform project.
Now, we only need to write a small amount of code to implement a simple reflection call.
With `Kotlin` elegant `lambda` and `YukiReflection`, you can make your reflection logic more beautiful and clear.
With Kotlin elegant **lambda** and `YukiReflection`, you can make your reflection logic more beautiful and clear.
> The following example

View File

@@ -16,60 +16,144 @@
- Gradle 7.0 and above
- JVM 11 and above
- Java 11 and above
- Java 17 and above (Since API `1.0.3`)
## Project Requirements
The project needs to be created using `Android Studio` or `IntelliJ IDEA` and the type is an Android project and the `Kotlin` environment dependency has been integrated.
The project needs to be created using `Android Studio` or `IntelliJ IDEA` and the type is an Java or Android project and the Kotlin environment dependency has been integrated.
## Integration Dependencies
**(Optional)** Add dependencies to your project `build.gradle`.
We recommend using Kotlin DSL as the Gradle build script language and [SweetDependency](https://github.com/HighCapable/SweetDependency) to manage dependencies.
#### SweetDependency (Recommended)
Add the repositories and dependencies in your project's `SweetDependency` configuration file.
> The following example
```yaml
repositories:
# MavenCentral has a 2-hour cache,
# if the latest version cannot be integrated, please add this
sonatype-oss-releases:
libraries:
com.highcapable.yukireflection:
api:
version: +
...
```
After adding it, run Gradle Sync and all dependencies will be autowired.
Next, deploy dependencies in your project `build.gradle.kts`.
> The following example
```kotlin
dependencies {
implementation(com.highcapable.yukireflection.api)
// ...
}
```
#### Traditional Method
Add repositories in your project `build.gradle.kts` or `build.gradle`.
> Kotlin DSL
```kotlin
repositories {
google()
mavenCentral()
// MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
}
```
> Groovy DSL
```groovy
repositories {
google()
mavenCentral()
// MavenCentral has a 2-hour cache, if you cannot integrate the latest version, please add this address
maven { url "https://s01.oss.sonatype.org/content/repositories/releases" }
// MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
}
```
Add dependencies to your app `build.gradle`.
Add dependencies in your project `build.gradle.kts` or `build.gradle`.
> The following example
> Kotlin DSL
```kotlin
dependencies {
implementation("com.highcapable.yukireflection:api:<yuki-version>")
// ...
}
```
> Groovy DSL
```groovy
dependencies {
// Base dependencies
implementation 'com.highcapable.yukireflection:api:<yuki-version>'
// ...
}
```
Please change **&lt;yuki-version&gt;** to the latest version from [here](../about/changelog).
Please change **&lt;yuki-version&gt;** to the latest version [here](../about/changelog).
::: danger
If your project is currently using [YukiHookAPI](https://github.com/fankes/YukiHookAPI), please do not repeatedly integrate **YukiReflection**, because **YukiHookAPI** already contains the functions and exists for related functional changes and repeated integration will cause functional conflicts and cause exceptions.
If your project is currently using the 1.x.x version of [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI), please do not integrate **YukiReflection** repeatedly, because **YukiHookAPI** already includes it functions and there are changes to related functions.
At this time, you should go to the [documentation](https://fankes.github.io/YukiHookAPI/en/) of **YukiHookAPI** to view the corresponding tutorial.
Repeated integration will cause functional conflicts and cause exceptions.
In this case, you should go to the [Documentation](https://highcapable.github.io/YukiHookAPI/zh-cn/) of **YukiHookAPI** view the corresponding usage tutorial.
**YukiHookAPI** will be completely separated from **YukiReflection** in version **2.0.0**, by which time you can use it with **YukiHookAPI** at the same time.
:::
Modify the `Kotlin` Jvm version to 11 and above in your app `build.gradle`.
#### Configure Java Version
> The following example
Modify the Java version of Kotlin in your project `build.gradle.kts` or `build.gradle` to 17 or above.
> Kotlin DSL
```kt
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
```
> Groovy DSL
```groovy
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
}
```
```
::: warning
Since API **1.0.3**, the Java version used by Kotlin defaults to 17, and versions 11 and below are no longer supported.
:::

View File

@@ -9,5 +9,32 @@ actions:
- text: Changelog
link: /en/about/changelog
type: secondary
footer: MIT License | Copyright (C) 2019-2023 HighCapable
---
features:
- title: Light and Elegant
details: A powerful, elegant, beautiful API built with Kotlin lambda can help you quickly implement bytecode finding and reflection functions.
- title: Cross-Platform Available
details: Not only the Android platform, it is highly compatible with the Java API and can be used on any Kotlin on JVM project, wherever Java is available.
- title: Quickly Started
details: Simple and easy to use it now! Do not need complex configuration and full development experience, Integrate dependencies and enjoy yourself.
footer: Apache-2.0 License | Copyright (C) 2019 HighCapable
---
### Bring it on! Let reflection become poetic and picturesque
```java
public class World {
private void sayHello(String content) {
System.out.println("Hello " + content + "!");
}
}
```
```kotlin
val newWorld = World()
classOf<World>().method {
name = "sayHello"
param(StringClass)
type = UnitType
}.get(newWorld).call("YukiReflection")
```

View File

@@ -13,5 +13,5 @@ actions:
- text: 简体中文
link: /zh-cn/
type: secondary
footer: MIT License | Copyright (C) 2019-2023 HighCapable
footer: Apache-2.0 License | Copyright (C) 2019 HighCapable
---

View File

@@ -2,32 +2,26 @@
> 此文档由 [VuePress](https://v2.vuepress.vuejs.org/zh) 强力驱动。
## License
## 许可证
[The MIT License (MIT)](https://github.com/fankes/YukiReflection/blob/master/LICENSE)
[Apache-2.0](https://github.com/HighCapable/YukiReflection/blob/master/LICENSE)
```:no-line-numbers
MIT License
Apache License Version 2.0
Copyright (C) 2019-2023 HighCapable
Copyright (C) 2019 HighCapable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
https://www.apache.org/licenses/LICENSE-2.0
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
版权所有 © 2019-2023 HighCapable
版权所有 © 2019 HighCapable

View File

@@ -8,7 +8,28 @@
:::
### 1.0.1 | 2023.04.16 &ensp;<Badge type="tip" text="最新" vertical="middle" />
### 1.0.3 | 2023.10.07 &ensp;<Badge type="tip" text="最新" vertical="middle" />
- 许可协议由 `MIT` 变更为 `Apache-2.0`,在此之后的版本将由此许可协议进行分发,您在使用此版本后应变更相关许可协议
- 将依赖库的类型由 **Android Library** (aar) 修改回 **Java Library** (jar)
- 适配并支持原生 Java 平台 (部分功能仅限 Android 平台)
- 修复 [fix get interfaces of class](https://github.com/HighCapable/YukiHookAPI/pull/38) 问题并合并到 `YukiReflection`
- 作废了 ~~`isAllowPrintingLogs`~~,请开始使用 `debugLog` 方法
- 新增 `YukiReflection.TAG`
- 作废了 ~~`YukiReflection.API_VERSION_NAME`~~、~~`YukiReflection.API_VERSION_CODE`~~,统一合并到 `YukiReflection.VERSION`
- 重构方法查找中的 `remendy` 功能,现在可以对其进行分步打印异常
- 多重方法查找结果类型由 `HashSet` 改为 `MutableList`
- 新增使用 `method()``constructor()``field()` 可直接获取到类中的所有对象功能
- `constructor()` 的行为不再是 `constructor { emptyParam() }`
- 新增 `lazyClass``lazyClassOrNull` 方法,可延迟装载 `Class`
### 1.0.2 | 2023.04.25 &ensp;<Badge type="warning" text="过旧" vertical="middle" />
- 修复一个严重问题,`Member` 缓存未生效且持续存储最终引发 APP 内存溢出 (OOM),感谢 [Art-Chen](https://github.com/Art-Chen)
- 移除 `Member` 的直接缓存功能并作废 ~~`YukiReflection.Configs.isEnableMemberCache`~~,保留 `Class` 的缓存功能
- 对接查找功能到 `Sequence`,优化 `Member` 的查找速度与性能
### 1.0.1 | 2023.04.16 &ensp;<Badge type="warning" text="过旧" vertical="middle" />
- 将依赖库的类型由 **Java Library** (jar) 修改为 **Android Library** (aar)
- 移除了 Android `type` 中的错误 `Class` 对象声明

View File

@@ -2,10 +2,14 @@
> 如在使用中有任何问题,或有任何建设性的建议,都可以联系我们。
加入我们 [点击加入 Telegram 群组](https://t.me/YukiReflection)
加入我们的开发者群组。
**酷安** 找到我 [@星夜不荟](http://www.coolapk.com/u/876977)
- [点击加入 Telegram 群组](https://t.me/YukiReflection)
- [点击加入 Telegram 群组 (开发者)](https://t.me/HighCapable_Dev)
- [点击加入 QQ 群 (开发者)](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
**酷安** 找到我 [@星夜不荟](http://www.coolapk.com/u/876977)。
## 助力维护
感谢您选择并使用 `YukiReflection`,如有代码相关的建议和请求,可在 Github 提交 Pull Request。
感谢您选择并使用 `YukiReflection`,如有代码相关的建议和请求,可在 GitHub 提交 Pull Request。

View File

@@ -8,9 +8,9 @@
### 自动生成反射代码
使用 `stub` 的方式创建一个 `Kotlin` 类,并声明其中的参数,以及其在各个版本中的不同状态。
使用 `stub` 的方式创建一个 Kotlin 类,并声明其中的参数,以及其在各个版本中的不同状态。
比如下面的这个 `Java` 类就是我们需要反射的目标类。
比如下面的这个 Java 类就是我们需要反射的目标类。
> 示例如下
@@ -56,7 +56,7 @@ classOf<MyClass>().buildOf().current {
}
```
目前要实现的功能是可以使用反射功能直接定义为如下 `Kotlin` 类。
目前要实现的功能是可以使用反射功能直接定义为如下 Kotlin 类。
> 示例如下
@@ -80,7 +80,7 @@ class MyClass {
}
```
然后我们就可以直接调用这个定义好的 `Kotlin` 类来实现反射功能API 会根据注解自动生成反射代码。
然后我们就可以直接调用这个定义好的 Kotlin 类来实现反射功能API 会根据注解自动生成反射代码。
> 示例如下
@@ -101,4 +101,110 @@ MyClass().also {
以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。
:::
### 自动生成可直接调用的 Class 对象
在 Kotlin 中,表示 Java 的类对象的方式是 `YourObject::class.java`,这个写法通常会很长,在反射过程中大量使用会很不美观。
在现有版本中,我们内置了常用的 `Class` 对象,但是这会增大依赖的体积,而且大多数情况下可能都用不到这些对象。
例如 `StringClass`、`IntType` 等等,这些对象都是在 `YukiReflection` 中内置的。
所以我们计划在后期添加一个功能,可以使用 `properties` 的方式创建一个需要生成的 `Class` 对象列表,通过 Gradle 插件依次生成这些 `Class` 对象。
诸如上面提到的这些原始类型的 `Class` 对象依然会内置在 `YukiReflection` 中,其余的 `Class` 对象需要自行定义。
生成的名称规范为 **类名 + Class**,为了防止包名冲突,你可以控制生成的 `Class` 对象的子包名。
在配置文件中,你无需添加 `Class` 作为后缀。
你可以在 Gradle 插件中定义生成的根包名,默认为 `com.highcapable.yukireflection.generated.classes`。
> 示例如下
```properties
# 最基本的定义方式就是直接写名称
# 将会生成到 com.highcapable.yukireflection.generated.classes.BundleClass
android.os.Bundle=Bundle
# 你可以在前方使用 "." 的形式来定义前置子包名
# 例如我们想把这个类定义到想要的包名
# 将会生成到 com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
android.os.Bundle=myandroid.myos.Bundle
# 你也可以不填写键值内容,这将使用键值名称作为定义的包名和类名
# 将会生成到 com.highcapable.yukireflection.generated.classes.android.os.BundleClass
android.os.Bundle
```
上述方式生成的 `Class` 对象的大概代码形式如下。
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
// 在默认 ClassLoader 的情况下使用
val BundleClass: Class<*> = "android.os.Bundle".toClass()
// 在指定 ClassLoader 的情况下使用
fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
```
也许这个 `Class` 可能在一些情况下无法被得到,这个时候你可以参考以下配置方式。
> 示例如下
```properties
# 在键值后添加 "?" 的形式来定义可空的 Class 对象
android.os.Bundle?
```
上述方式生成的 `Class` 对象的大概代码形式如下。
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
// 在默认 ClassLoader 的情况下使用
val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
// 在指定 ClassLoader 的情况下使用
fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
```
如果这个 `Class` 对象能使用直接调用的方式进行引用,这个时候你可以参考以下配置方式。
> 示例如下
```properties
# 在键值后添加 "!!" 的形式来定义可直接调用的 Class 对象
android.os.Bundle!!
```
上述方式生成的 `Class` 对象的大概代码形式如下。
```kotlin
package com.highcapable.yukireflection.generated.classes.android.os
import android.os.Bundle
// 在默认 ClassLoader 的情况下使用
val BundleClass: Class<Bundle> = classOf<Bundle>()
// 在指定 ClassLoader 的情况下使用
fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
```
有了生成的 `Class` 对象,我们就可以愉快地使用 `YukiReflection` 进行反射了。
> 示例如下
```kotlin
method {
name = "onCreate"
param(BundleClass)
}
```
::: tip
以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。
:::

View File

@@ -66,6 +66,50 @@ var instance = classOf<Test>(customClassLoader)
:::
### 延迟装载
假设我们要得到一个不能直接调用的 `Class`,但是我们也不是立刻就需要这个 `Class`
这个时候,你可以使用 `lazyClass` 来完成这个功能。
> 示例如下
```kotlin
// 延迟装载这个 Class
val instance by lazyClass("com.demo.Test")
// 自定义 Class 所在的 ClassLoader
val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
val instance by lazyClass("com.demo.Test") { customClassLoader }
// 在适当的时候调用这个 Class
instance.method {
// ...
}
```
如果当前 `Class` 并不存在,使用上述方法会抛出异常,如果你不确定 `Class` 是否存在,可以参考下面的解决方案。
> 示例如下
```kotlin
// 延迟装载这个 Class
// 得不到时结果会为 null 但不会抛出异常
val instance by lazyClassOrNull("com.demo.Test")
// 自定义 Class 所在的 ClassLoader
val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
// 得不到时结果会为 null 但不会抛出异常
val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
// 在适当的时候调用这个 Class
instance?.method {
// ...
}
```
::: tip
更多功能请参考 [lazyClass](../public/com/highcapable/yukireflection/factory/ReflectionFactory#lazyclass-method)、[lazyClassOrNull](../public/com/highcapable/yukireflection/factory/ReflectionFactory#lazyclassornull-method) 方法。
:::
### 存在判断
假设我们要判断一个 `Class` 是否存在,通常情况下,我们可以使用标准的反射 API 去查找这个 `Class` 通过异常来判断是否存在。
@@ -118,6 +162,8 @@ var isExist = "com.demo.Test".hasClass(customClassLoader)
::: warning
**此功能仅适用于 Android 平台。**
目前 **DexClassFinder** 的功能尚在试验阶段,由于仅通过 Java 层实现查找功能,在当前 APP **Class** 过多时性能可能不能达到最佳水平,如果发生查找不到、定位有误的问题欢迎向我们反馈。
由于是反射层面的 API目前它只能通过**类与成员**的特征来定位指定的 **Class**,不能通过指定字节码中的字符串和方法内容特征来进行定位。
@@ -126,6 +172,14 @@ var isExist = "com.demo.Test".hasClass(customClassLoader)
:::
::: danger
**YukiHookAPI** 发布 **2.0.0** 版本后,此功能将被标记为作废,且将会直接从 **YukiReflection** 中移除。
我们欢迎各位开发者开始使用 [DexKit](https://github.com/LuckyPray/DexKit),它是一个使用 C++ 实现的 **Dex** 高性能运行时解析库,在性能方面比 Java 层更加高效与优秀,目前尚在开发阶段,欢迎提出宝贵建议。
:::
#### 开始使用
下面是一个简单的用法示例。
@@ -1100,7 +1154,7 @@ instance.current {
name = "stop"
emptyParam()
}.call()
// 注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用
// 注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用
instance.current().current()
```
@@ -1470,11 +1524,7 @@ TestGeneric::class.java.generic()?.argument()?.method {
#### 限制性查找条件
::: danger
在查找条件中,除了 **order** 你只能使用一次 **index** 功能。
:::
在查找条件中,除了 `order` 你<u>**只能**</u>使用一次 `index` 功能。
> 示例如下
@@ -1482,7 +1532,7 @@ TestGeneric::class.java.generic()?.argument()?.method {
method {
name = "test"
param(BooleanType).index(num = 2)
// 错误的使用方法,请仅保留一个 index 方法
// 错误的使用方法,请仅保留一个 index 方法
returnType(StringClass).index(num = 1)
}
```
@@ -1501,12 +1551,8 @@ method {
#### 必要的查找条件
::: danger
在普通方法查找条件中,<u>**即使是无参的方法也需要设置查找条件**</u>。
:::
假设我们有如下的 `Class`。
> 示例如下
@@ -1556,9 +1602,13 @@ TestFoo::class.java.method {
至此,上述的示例将可以完美地匹配到 `public void foo()` 方法。
#### 可简写查找条件
::: tip 兼容性说明
> 在构造方法查找条件中,<u>**无参的构造方法可以不需要填写查找条件**</u>
在过往历史版本的 API 中是允许匹配不写默认匹配无参方法的做法的,但是最新版本更正了这一问题,请确保你使用的是最新的 API 版本
:::
在构造方法查找条件中,<u>**即使是无参的构造方法也需要设置查找条件**</u>。
假设我们有如下的 `Class`。
@@ -1573,7 +1623,7 @@ public class TestFoo {
}
```
我们要得到其中的 `public TestFoo()` 构造方法,可以写作如下形式。
我们要得到其中的 `public TestFoo()` 构造方法,必须写作如下形式。
> 示例如下
@@ -1581,23 +1631,53 @@ public class TestFoo {
TestFoo::class.java.constructor { emptyParam() }
```
上面的例子可以成功获取到 `public TestFoo()` 构造方法,但是感觉有一些繁琐
上面的例子可以成功获取到 `public TestFoo()` 构造方法。
与普通方法不同,由于构造方法不需要考虑 `name` 名称,当构造方法没有参数的时候,我们可以省略 `emptyParam` 参数
如果你写作 `constructor()` 而丢失了 `emptyParam()`,此时查找到的结果会是按照字节码顺序排列的的第一位,<u>**可能并不是无参的**</u>
::: tip 兼容性说明
在过往历史版本的 API 中构造方法不填写任何查找参数会直接找不到构造方法,<u>**这是一个 BUG最新版本已经进行修复**</u>,请确保你使用的是最新的 API 版本。
:::
::: danger API 行为变更
在 **1.2.0** 及之后的版本中,**constructor()** 的行为不再是 **constructor { emptyParam() }** 而是 **constructor {}**,请注意行为变更合理调整查找参数。
:::
#### 不设置查找条件
在不设置查找条件的情况下,使用 `field()`、`constructor()`、`method()` 将返回当前 `Class` 下的所有成员对象。
使用 `get(...)` 或 `give()` 的方式获取将只能得到按照字节码顺序排列的的第一位。
> 示例如下
```kotlin
TestFoo::class.java.constructor()
Test::class.java.field().get(...)
Test::class.java.method().give()
```
如果你想得到全部成员对象,你可以使用 `all(...)` 或 `giveAll()`
> 示例如下
```kotlin
Test::class.java.field().all(...)
Test::class.java.method().giveAll()
```
::: tip 兼容性说明
在过往历史版本的 API 中,不设置查找条件将抛出异常,此特性在 **1.2.0** 及之后的版本中加入。
:::
#### 字节码类型
::: danger
在字节码调用结果中,**cast** 方法只能指定字节码对应的类型。
:::
在字节码调用结果中,**cast** 方法<u>**只能**</u>指定字节码对应的类型。
例如我们想得到一个 `Boolean` 类型的变量,把他转换为 `String`。
@@ -1609,7 +1689,7 @@ TestFoo::class.java.constructor()
field {
name = "test"
type = BooleanType
}.get().string() // 错误的使用方法,必须 cast 为字节码目标类型
}.get().string() // 错误的使用方法,必须 cast 为字节码目标类型
```
以下是正确的使用方法。
@@ -1636,7 +1716,7 @@ field {
}
```
`Kotlin` 中表达出 `Boolean::class.javaPrimitiveType` 这个类型的写法很长,感觉并不方便。
在 Kotlin 中表达出 `Boolean::class.javaPrimitiveType` 这个类型的写法很长,感觉并不方便。
因此,`YukiReflection` 为开发者封装了常见的类型调用,其中包含了 Android 的相关类型和 Java 的常见类型与**原始类型关键字**。

View File

@@ -16,33 +16,53 @@ object YukiReflection
> 这是 `YukiReflection` 的装载调用类。
## API_VERSION_NAME <span class="symbol">- field</span>
## TAG <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val API_VERSION_NAME: String
const val TAG: String
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `新增`
**功能描述**
> 获取当前 `YukiReflection` 的名称 (标签)。
## VERSION <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val VERSION: String
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 获取当前 `YukiReflection` 的版本。
## API_VERSION_CODE <span class="symbol">- field</span>
```kotlin:no-line-numbers
const val API_VERSION_CODE: Int
```
<h2 class="deprecated">API_VERSION_NAME - field</h2>
**变更记录**
`v1.0.0` `添加`
**功能描述**
`v1.0.3` `作废`
> 获取当前 `YukiReflection` 的版本号。
不再区分版本名称和版本号,请迁移到 `VERSION`
<h2 class="deprecated">API_VERSION_CODE - field</h2>
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `作废`
不再区分版本名称和版本号,请迁移到 `VERSION`
## Configs <span class="symbol">- object</span>
@@ -58,23 +78,29 @@ object Configs
> 对 API 相关功能的配置类。
### debugTag <span class="symbol">- field</span>
### debugLog <span class="symbol">- method</span>
```kotlin:no-line-numbers
var debugTag: String
inline fun debugLog(initiate: YLog.Configs.() -> Unit)
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 配置 `YLog.Configs` 相关参数。
<h3 class="deprecated">debugTag - field</h3>
**变更记录**
`v1.0.0` `添加`
**功能描述**
`v1.0.3` `作废`
> 这是一个调试日志的全局标识。
默认文案为 `YukiReflection`。
你可以修改为你自己的文案。
请迁移到 `debugLog`
### isDebug <span class="symbol">- field</span>
@@ -92,51 +118,25 @@ var isDebug: Boolean
默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。
请过滤 `debugTag` 即可找到每条日志。
### isAllowPrintingLogs <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isAllowPrintingLogs: Boolean
```
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
**变更记录**
`v1.0.0` `添加`
**功能描述**
`v1.0.3` `作废`
> 是否启用调试日志的输出功能。
请迁移到 `debugLog`
::: warning
关闭后将会停用 **YukiReflection** 对全部日志的输出。
:::
### isEnableMemberCache <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isEnableMemberCache: Boolean
```
<h3 class="deprecated">isEnableMemberCache - field</h3>
**变更记录**
`v1.0.0` `添加`
**功能描述**
`v1.0.2` `作废`
> 是否启用 `Member` 缓存功能
为防止 `Member` 复用过高造成的系统 GC 问题,此功能默认启用。
启用后会缓存已经找到的 `Method`、`Constructor`、`Field`。
缓存的 `Member` 都将处于 `ReflectsCacheStore` 的全局静态实例中。
推荐使用 `MethodFinder`、`ConstructorFinder`、`FieldFinder` 来获取 `Member`。
除非缓存的 `Member` 发生了混淆的问题,例如使用 R8 混淆后的 APP 的目标 `Member`,否则建议启用。
`Member` 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题
## configs <span class="symbol">- method</span>
@@ -150,6 +150,6 @@ inline fun configs(initiate: Configs.() -> Unit)
**功能描述**
> 对 `Configs` 类实现了一个 `lambda` 方法体。
> 对 `Configs` 类实现了一个 **lambda** 方法体。
你可以轻松地调用它进行配置。

View File

@@ -5,7 +5,7 @@ pageClass: code-page
# CurrentClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
class CurrentClass internal constructor(internal val classSet: Class<*>, internal val instance: Any)
class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
```
**变更记录**
@@ -121,7 +121,7 @@ inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
## SuperClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class SuperClass internal constructor(internal val superClassSet: Class<*>)
inner class SuperClass internal constructor(private val superClassSet: Class<*>)
```
**变更记录**

View File

@@ -19,17 +19,27 @@ class GenericClass internal constructor(private val type: ParameterizedType)
## argument <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun argument(index: Int): Class<*>
fun argument(index: Int): Class<*>?
```
```kotlin:no-line-numbers
inline fun <reified T> argument(index: Int): Class<T>
inline fun <reified T> argument(index: Int): Class<T>?
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
方法的返回值可为 `null`
**功能描述**
> 获得泛型参数数组下标的 `Class` 实例。
> 获得泛型参数数组下标的 `Class` 实例。
::: warning
在运行时局部变量的泛型会被擦除,获取不到时将会返回 **null**
:::

View File

@@ -12,6 +12,24 @@ pageClass: code-page
> 这是自定义 `Member` 和 `Class` 相关功能的查找匹配以及 `invoke` 的封装类。
## LazyClass <span class="symbol">- class</span>
```kotlin:no-line-numbers
open class LazyClass<T> internal constructor(
private val instance: Any,
private val initialize: Boolean,
private val loader: ClassLoaderInitializer?
)
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 懒装载 `Class` 实例。
## ClassLoader.listOfClasses <span class="symbol">- ext-method</span>
```kotlin:no-line-numbers
@@ -345,7 +363,7 @@ inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class
**功能示例**
我们要获取一个 `Class` 在 `Kotlin` 下不通过反射时应该这样做。
我们要获取一个 `Class` 在 Kotlin 下不通过反射时应该这样做。
> 示例如下
@@ -370,6 +388,50 @@ val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoade
classOf<DemoClass>(customClassLoader)
```
## lazyClass <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
```
```kotlin:no-line-numbers
inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
```
```kotlin:no-line-numbers
fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 懒装载 `Class`。
## lazyClassOrNull <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
```
```kotlin:no-line-numbers
inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
```
```kotlin:no-line-numbers
fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 懒装载 `Class`。
## String.hasClass <span class="symbol">- ext-method</span>
```kotlin:no-line-numbers

View File

@@ -434,7 +434,7 @@ fun enclosing(vararg name: String)
## FromPackageRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class FromPackageRules internal constructor(private val packages: ArrayList<ClassRulesData.PackageRulesData>)
inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
```
**变更记录**
@@ -618,20 +618,24 @@ fun get(): Class<*>?
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(): HashSet<Class<*>>
fun all(): MutableList<Class<*>>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 得到 `Class` 本身数组。
返回全部查找条件匹配的多个 `Class` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
若你设置了 `async` 请使用 [waitAll](#waitall-method) 方法。
@@ -678,20 +682,24 @@ fun wait(result: (Class<*>?) -> Unit): Result
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(result: (HashSet<Class<*>>) -> Unit): Result
fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`result` 类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 得到 `Class` 本身数组 (异步)。
回调全部查找条件匹配的多个 `Class` 实例。
在查找条件找不到任何结果的时候将回调空的 `HashSet`。
在查找条件找不到任何结果的时候将回调空的 `MutableList`。
你需要设置 `async` 后此方法才会被回调,否则请使用 [all](#all-method) 方法。

View File

@@ -5,7 +5,7 @@ pageClass: code-page
# ConstructorRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class ConstructorRules internal constructor(internal val rulesData: ConstructorRulesData) : BaseRules
class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
```
**变更记录**

View File

@@ -5,7 +5,7 @@ pageClass: code-page
# FieldRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class FieldRules internal constructor(internal val rulesData: FieldRulesData) : BaseRules
class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
```
**变更记录**

View File

@@ -5,7 +5,7 @@ pageClass: code-page
# MemberRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class MemberRules internal constructor(internal val rulesData: MemberRulesData) : BaseRules
class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
```
**变更记录**

View File

@@ -5,7 +5,7 @@ pageClass: code-page
# MethodRules <span class="symbol">- class</span>
```kotlin:no-line-numbers
class MethodRules internal constructor(internal val rulesData: MethodRulesData) : BaseRules
class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
```
**变更记录**

View File

@@ -259,13 +259,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Constructor<*>>.() -> Unit)
fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 当在 `RemedyPlan` 中找到结果时。
@@ -314,7 +318,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**功能示例**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> 示例如下
@@ -390,13 +394,17 @@ constructor {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(): ArrayList<Instance>
fun all(): MutableList<Instance>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Constructor` 实例处理类数组。
@@ -438,20 +446,24 @@ fun give(): Constructor<*>?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Constructor<*>>
fun giveAll(): MutableList<Constructor<*>>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 得到 `Constructor` 本身数组。
返回全部查找条件匹配的多个 `Constructor` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -480,13 +492,17 @@ fun wait(initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(initiate: MutableList<Instance>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Constructor` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -245,13 +245,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Field>.() -> Unit)
fun onFind(initiate: MutableList<Field>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 当在 `RemedyPlan` 中找到结果时。
@@ -273,7 +277,7 @@ field {
## Result <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
```
**变更记录**
@@ -300,7 +304,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**功能示例**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> 示例如下
@@ -360,13 +364,17 @@ field {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(instance: Any?): ArrayList<Instance>
fun all(instance: Any?): MutableList<Instance>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Field` 实例处理类数组。
@@ -408,20 +416,24 @@ fun give(): Field?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Field>
fun giveAll(): MutableList<Field>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 得到 `Field` 本身数组。
返回全部查找条件匹配的多个 `Field` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -450,13 +462,17 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Field` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -395,13 +395,17 @@ inner class Result internal constructor()
#### onFind <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun onFind(initiate: HashSet<Method>.() -> Unit)
fun onFind(initiate: MutableList<Method>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 当在 `RemedyPlan` 中找到结果时。
@@ -423,7 +427,7 @@ method {
## Result <span class="symbol">- class</span>
```kotlin:no-line-numbers
inner class Result internal constructor(internal val isNoSuch: Boolean, private val throwable: Throwable?) : BaseResult
inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
```
**变更记录**
@@ -450,7 +454,7 @@ inline fun result(initiate: Result.() -> Unit): Result
**功能示例**
你可以使用 `lambda` 形式创建 `Result` 类。
你可以使用 **lambda** 形式创建 `Result` 类。
> 示例如下
@@ -512,13 +516,17 @@ method {
### all <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun all(instance: Any?): ArrayList<Instance>
fun all(instance: Any?): MutableList<Instance>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Method` 实例处理类数组。
@@ -560,20 +568,24 @@ fun give(): Method?
### giveAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun giveAll(): HashSet<Method>
fun giveAll(): MutableList<Method>
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
返回值类型由 `HashSet` 修改为 `MutableList`
**功能描述**
> 得到 `Method` 本身数组。
返回全部查找条件匹配的多个 `Method` 实例。
在查找条件找不到任何结果的时候将返回空的 `HashSet`。
在查找条件找不到任何结果的时候将返回空的 `MutableList`。
### wait <span class="symbol">- method</span>
@@ -602,13 +614,17 @@ fun wait(instance: Any?, initiate: Instance.() -> Unit)
### waitAll <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun waitAll(instance: Any?, initiate: ArrayList<Instance>.() -> Unit)
fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
```
**变更记录**
`v1.0.0` `添加`
`v1.0.3` `修改`
`initiate` 类型由 `ArrayList` 修改为 `MutableList`
**功能描述**
> 获得 `Method` 实例处理类数组,配合 `RemedyPlan` 使用。

View File

@@ -0,0 +1,67 @@
---
pageClass: code-page
---
# YLog <span class="symbol">- object</span>
```kotlin:no-line-numbers
object YLog
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 全局 Log 管理类。
## Configs <span class="symbol">- object</span>
```kotlin:no-line-numbers
object Configs
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 配置 `YLog`。
### tag <span class="symbol">- field</span>
```kotlin:no-line-numbers
var tag: String
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 这是一个调试日志的全局标识。
默认文案为 `YukiReflection`。
你可以修改为你自己的文案。
### isEnable <span class="symbol">- field</span>
```kotlin:no-line-numbers
var isEnable: Boolean
```
**变更记录**
`v1.0.3` `新增`
**功能描述**
> 是否启用调试日志的输出功能。
关闭后将会停用 `YukiReflection` 对全部日志的输出。
当 `isEnable` 关闭后 `YukiReflection.Configs.isDebug` 也将同时关闭。

View File

@@ -12,4 +12,4 @@ pageClass: code-page
> 这是一个预置反射类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt) 进行查看。

View File

@@ -12,4 +12,4 @@ pageClass: code-page
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt) 进行查看。

View File

@@ -12,4 +12,4 @@ pageClass: code-page
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt) 进行查看。

View File

@@ -10,6 +10,6 @@ pageClass: code-page
**功能描述**
> 这是一个预置反射类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
> 这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
详情可 [点击这里](https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt) 进行查看。
详情可 [点击这里](https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt) 进行查看。

View File

@@ -2,21 +2,21 @@
> 这里介绍了 `YukiReflection` 的基本配置方法。
`YukiReflection` 无需一些复杂的配置即可直接开始使用,且不会与 `Java` 原生的反射 API 冲突。
`YukiReflection` 无需一些复杂的配置即可直接开始使用,且不会与 Java 原生的反射 API 冲突。
你可以在使用之前对 `YukiReflection` 进行一些功能配置。
## 获取 API 版本
## 获取 API 标签 & 版本
你可以通过如下方式获取当前 `YukiReflection` API 版本。
你可以通过如下方式获取当前 `YukiReflection`标签和版本。
> 示例如下
```kotlin
// 获取版本名称
val versionName = YukiReflection.API_VERSION_NAME
// 获取版本
val versionCode = YukiReflection.API_VERSION_CODE
// 获取标签
val tag = YukiReflection.TAG
// 获取版本
val version = YukiReflection.VERSION
```
你可以通过获取版本进行一些不同版本差异的判断或用于显示在关于信息中。
@@ -42,10 +42,12 @@ API 内部的日志将会使用此标签进行打印。
```kotlin
// 通过 configs 方法
YukiReflection.configs {
debugTag = "YourCustomTag"
debugLog {
tag = "YourCustomTag"
}
}
// 直接设置
YukiReflection.Configs.debugTag = "YourCustomTag"
YLog.Configs.tag = "YourCustomTag"
```
### 启用或禁用 Debug 模式
@@ -76,27 +78,12 @@ YukiReflection.Configs.isDebug = true
```kotlin
// 通过 configs 方法
YukiReflection.configs {
isAllowPrintingLogs = true
debugLog {
isEnable = true
}
}
// 直接设置
YukiReflection.Configs.isAllowPrintingLogs = true
```
### 启用或禁用 Member 缓存
你可以使用如下方式来启用或禁用 `Member` 缓存。
为防止 `Member` 复用过高造成的系统 GC 问题,此功能默认启用。
> 示例如下
```kotlin
// 通过 configs 方法
YukiReflection.configs {
isEnableMemberCache = true
}
// 直接设置
YukiReflection.Configs.isEnableMemberCache = true
YLog.Configs.isEnable = true
```
### 使用 configs 方法配置
@@ -107,10 +94,11 @@ YukiReflection.Configs.isEnableMemberCache = true
```kotlin
YukiReflection.configs {
debugTag = "YourCustomTag"
debugLog {
tag = "YourCustomTag"
isEnable = true
}
isDebug = true
isAllowPrintingLogs = true
isEnableMemberCache = true
}
```

View File

@@ -29,15 +29,15 @@ Method/Constructor/Field match type "**TYPE**" not allowed
```kotlin
// 查找一个方法
method {
// 设置了无效的类型举例
// 设置了无效的类型举例
param(false, 1, 0)
// 设置了无效的类型举例
// 设置了无效的类型举例
returnType = false
}
// 查找一个变量
field {
// 设置了无效的类型举例
// 设置了无效的类型举例
type = false
}
```
@@ -102,30 +102,6 @@ Trying **COUNT** times and all failure by RemedyPlan
::: danger loggerE
You must set a condition when finding a Method/Constructor/Field
:::
**异常原因**
在查找方法、构造方法以及变量时并未设置任何条件。
> 示例如下
```kotlin
method {
// 这里没有设置任何条件
}
```
**解决方案**
请将查找条件补充完整并再试一次。
###### exception
::: danger loggerE
Can't find this Class in \[**CLASSLOADER**\]: **CONTENT** Generated by YukiReflection#ReflectionTool
:::

View File

@@ -1,34 +1,34 @@
# 介绍
> `YukiReflection` 是一个基于 Android 平台的反射 API。
> `YukiReflection` 是一个基于 Java 和 Android 平台的反射 API。
## 背景
这是一个使用 `Kotlin` 基于 `Java` 原生反射 API 重新打造的一套简洁、高效的反射 API。
这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API。
`YukiReflection` 同时也是 [YukiHookAPI](https://github.com/fankes/YukiHookAPI) 正在使用的核心功能。
`YukiReflection` 同时也是 [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) 正在使用的核心功能。
名称取自 [《ももくり》女主 栗原 雪(Yuki)](https://www.bilibili.com/bangumi/play/ss5016)。
## 用途
`YukiReflection` 完全采用 `Kotlin` `lambda` 语法构建。
`YukiReflection` 完全采用 Kotlin **lambda** 语法构建。
它能取代 [Java 原生的反射 API](https://pdai.tech/md/java/basic/java-basic-x-reflection.html),使用更加人性化的语言实现一套更加完善的反射方案。
## 语言要求
请使用 `Kotlin`API 部分代码构成同样兼容 `Java` 但基础反射场景的实现**可能完全无法使用**。
请使用 KotlinAPI 部分代码构成同样兼容 Java 但基础反射场景的实现**可能完全无法使用**。
文档全部的 Demo 示例代码都将使用 `Kotlin` 进行描述,如果你完全不会使用 `Kotlin` 那你将有可能无法使用 `YukiReflection`
文档全部的 Demo 示例代码都将使用 Kotlin 进行描述,如果你完全不会使用 Kotlin 那你将有可能无法使用 `YukiReflection`
## 灵感来源
`YukiReflection` 最初是集成在 [YukiHookAPI](https://github.com/fankes/YukiHookAPI) 项目中的核心功能,现在进行了解耦合,使得这套反射 API 可以在任何 Android 平台的项目中使用。
`YukiReflection` 最初是集成在 [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) 项目中的核心功能,现在进行了解耦合,使得这套反射 API 可以在任何 Java 和 Android 平台的项目中使用。
现在,我们只需要编写少量的代码,就能实现一个简单的反射调用。
借助 `Kotlin` 优雅的 `lambda` 写法以及 `YukiReflection`,可以让你的反射逻辑更加美观清晰。
借助 Kotlin 优雅的 **lambda** 写法以及 `YukiReflection`,可以让你的反射逻辑更加美观清晰。
> 示例如下

View File

@@ -4,7 +4,7 @@
## 环境要求
- Windows 7 及以上/macOS 10.14 及以上/Linux 发行版(Arch/Debian)
- Windows 7 及以上/macOS 10.14 及以上/Linux 发行版 (Arch/Debian)
- Android Studio 2021.1 及以上
@@ -16,35 +16,92 @@
- Gradle 7.0 及以上
- Jvm 11 及以上
- Java 11 及以上
- Java 17 及以上 (Since API `1.0.3`)
## 项目要求
项目需要使用 `Android Studio``IntelliJ IDEA` 创建且类型为 Android 项目并已集成 `Kotlin` 环境依赖。
项目需要使用 `Android Studio``IntelliJ IDEA` 创建且类型为 Java 或 Android 项目并已集成 Kotlin 环境依赖。
## 集成依赖
### 集成依赖
**(可选)** 在你的项目 `build.gradle` 中添加依赖。
我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言并推荐使用 [SweetDependency](https://github.com/HighCapable/SweetDependency) 来管理依赖。
#### SweetDependency (推荐)
在你的项目 `SweetDependency` 配置文件中添加存储库和依赖。
> 示例如下
```yaml
repositories:
# MavenCentral 有 2 小时缓存,若无法集成最新版本请添加
sonatype-oss-releases:
libraries:
com.highcapable.yukireflection:
api:
version: +
...
```
添加完成后运行一次 Gradle Sync所有依赖版本将自动装配。
接下来,在你的项目 `build.gradle.kts` 中部署依赖。
> 示例如下
```kotlin
dependencies {
implementation(com.highcapable.yukireflection.api)
// ...
}
```
#### 传统方式
在你的项目 `build.gradle.kts``build.gradle` 中添加存储库。
> Kotlin DSL
```kotlin
repositories {
google()
mavenCentral()
// MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
}
```
> Groovy DSL
```groovy
repositories {
google()
mavenCentral()
// MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
maven { url "https://s01.oss.sonatype.org/content/repositories/releases" }
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
}
```
在你的 app `build.gradle` 中添加依赖。
在你的项目 `build.gradle.kts` `build.gradle` 中添加依赖。
> 示例如下
> Kotlin DSL
```kotlin
dependencies {
implementation("com.highcapable.yukireflection:api:<yuki-version>")
// ...
}
```
> Groovy DSL
```groovy
dependencies {
// 基础依赖
implementation 'com.highcapable.yukireflection:api:<yuki-version>'
// ...
}
```
@@ -52,22 +109,46 @@ dependencies {
::: danger
如果你的项目目前正在使用 [YukiHookAPI](https://github.com/fankes/YukiHookAPI),请不要重复集成 **YukiReflection**,因为 **YukiHookAPI** 已经包含了其中的功能且存在针对相关功能的改动,重复集成会造成功能性冲突引发异常,此时你应该前往 **YukiHookAPI** 的 [文档](https://fankes.github.io/YukiHookAPI/zh-cn/) 查看对应使用教程。
如果你的项目目前正在使用 [YukiHookAPI](https://github.com/HighCapable/YukiHookAPI) 的 1.x.x 版本,请不要重复集成 **YukiReflection**,因为 **YukiHookAPI** 已经包含了其中的功能且存在针对相关功能的改动,重复集成会造成功能性冲突引发异常,此时你应该前往 **YukiHookAPI** 的 [文档](https://highcapable.github.io/YukiHookAPI/zh-cn/) 查看对应使用教程。
**YukiHookAPI** 将在 **2.0.0** 版本完全分离 **YukiReflection**,届时你可以同时与 **YukiHookAPI** 使用。
:::
在你的 app `build.gradle` 中修改 `Kotlin` 的 Jvm 版本为 11 及以上。
#### 配置 Java 版本
> 示例如下
在你的项目 `build.gradle.kts``build.gradle` 中修改 Kotlin 的 Java 版本为 17 及以上。
> Kotlin DSL
```kt
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
```
> Groovy DSL
```groovy
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
}
```
```
::: warning
自 API **1.0.3** 版本后 Kotlin 使用的 Java 版本默认为 17不再支持 11 及以下版本。
:::

View File

@@ -9,5 +9,32 @@ actions:
- text: 更新日志
link: /zh-cn/about/changelog
type: secondary
footer: MIT License | Copyright (C) 2019-2023 HighCapable
---
features:
- title: 轻量优雅
details: 拥有一套强大、优雅、人性化、完全使用 Kotlin lambda 打造的 API可以帮你快速实现字节码的查找以及反射功能。
- title: 可跨平台
details: 不仅仅是 Android 平台,它与 Java API 高度兼容,可使用在任何 Kotlin on JVM 的项目上,有 Java 的地方就可以使用。
- title: 快速上手
details: 简单易用,不需要繁琐的配置,不需要十足的开发经验,搭建环境集成依赖即可立即开始使用。
footer: Apache-2.0 License | Copyright (C) 2019 HighCapable
---
### 来吧!让反射也变得诗情画意
```java
public class World {
private void sayHello(String content) {
System.out.println("Hello " + content + "!");
}
}
```
```kotlin
val newWorld = World()
classOf<World>().method {
name = "sayHello"
param(StringClass)
type = UnitType
}.get(newWorld).call("YukiReflection")
```

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{_ as e,o as c,c as t}from"./app.cacad56c.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};

View File

@@ -1 +0,0 @@
const t=JSON.parse('{"key":"v-3706649a","path":"/404.html","title":"","lang":"en-US","frontmatter":{"layout":"NotFound"},"excerpt":"","headers":[],"git":{},"filePathRelative":null}');export{t as data};

View File

@@ -1,9 +0,0 @@
import{_ as s,o as e,c as n,e as o}from"./app.cacad56c.js";const a={},l=o(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <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;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8FD9\u662F <code>Class</code> \u4E0E <code>Member</code> \u67E5\u627E\u7C7B\u529F\u80FD\u7684\u57FA\u672C\u7C7B\u5B9E\u73B0\u3002</p></blockquote><h2 id="basefinder-indextypecondition-class" tabindex="-1"><a class="header-anchor" href="#basefinder-indextypecondition-class" aria-hidden="true">#</a> BaseFinder.IndexTypeCondition <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;">IndexTypeCondition</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;"> type</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexConfigType</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5B57\u8282\u7801\u4E0B\u6807\u7B5B\u9009\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="index-method" tabindex="-1"><a class="header-anchor" href="#index-method" aria-hidden="true">#</a> index <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;">index</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u4E0B\u6807\u3002</p></blockquote><p>\u82E5 <code>index</code> \u5C0F\u4E8E\u96F6\u5219\u4E3A\u5012\u5E8F\uFF0C\u6B64\u65F6\u53EF\u4EE5\u4F7F\u7528 <code>IndexTypeConditionSort.reverse</code> \u65B9\u6CD5\u5B9E\u73B0\u3002</p><p>\u53EF\u4F7F\u7528 <code>IndexTypeConditionSort.first</code> \u548C <code>IndexTypeConditionSort.last</code> \u8BBE\u7F6E\u9996\u4F4D\u548C\u672B\u4F4D\u7B5B\u9009\u6761\u4EF6\u3002</p><h3 id="index-method-1" tabindex="-1"><a class="header-anchor" href="#index-method-1" aria-hidden="true">#</a> index <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;">index</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeConditionSort</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5F97\u5230\u4E0B\u6807\u3002</p></blockquote><h3 id="indextypeconditionsort-class" tabindex="-1"><a class="header-anchor" href="#indextypeconditionsort-class" aria-hidden="true">#</a> IndexTypeConditionSort <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;">IndexTypeConditionSort</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5B57\u8282\u7801\u4E0B\u6807\u6392\u5E8F\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h4 id="first-method" tabindex="-1"><a class="header-anchor" href="#first-method" aria-hidden="true">#</a> first <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;">first</span><span style="color:#ADBAC7;">()</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u6EE1\u8DB3\u6761\u4EF6\u7684\u7B2C\u4E00\u4E2A\u3002</p></blockquote><h4 id="last-method" tabindex="-1"><a class="header-anchor" href="#last-method" aria-hidden="true">#</a> last <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;">last</span><span style="color:#ADBAC7;">()</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u6EE1\u8DB3\u6761\u4EF6\u7684\u6700\u540E\u4E00\u4E2A\u3002</p></blockquote><h4 id="reverse-method" tabindex="-1"><a class="header-anchor" href="#reverse-method" aria-hidden="true">#</a> reverse <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;">reverse</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u5012\u5E8F\u4E0B\u6807\u3002</p></blockquote>`,51),t=[l];function p(c,r){return e(),n("div",null,t)}const i=s(a,[["render",p],["__file","BaseFinder.html.vue"]]);export{i as default};

View File

@@ -1,9 +0,0 @@
import{_ as s,o as n,c as o,e}from"./app.cacad56c.js";const a={},p=e(`<h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <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;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</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>\u8FD9\u662F <code>Class</code> \u4E0E <code>Member</code> \u67E5\u627E\u7C7B\u529F\u80FD\u7684\u57FA\u672C\u7C7B\u5B9E\u73B0\u3002</p></blockquote><h2 id="basefinder-indextypecondition-class" tabindex="-1"><a class="header-anchor" href="#basefinder-indextypecondition-class" aria-hidden="true">#</a> BaseFinder.IndexTypeCondition <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;">IndexTypeCondition</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;"> type</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexConfigType</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>\u5B57\u8282\u7801\u4E0B\u6807\u7B5B\u9009\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="index-method" tabindex="-1"><a class="header-anchor" href="#index-method" aria-hidden="true">#</a> index <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;">index</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</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>\u8BBE\u7F6E\u4E0B\u6807\u3002</p></blockquote><p>\u82E5 <code>index</code> \u5C0F\u4E8E\u96F6\u5219\u4E3A\u5012\u5E8F\uFF0C\u6B64\u65F6\u53EF\u4EE5\u4F7F\u7528 <code>IndexTypeConditionSort.reverse</code> \u65B9\u6CD5\u5B9E\u73B0\u3002</p><p>\u53EF\u4F7F\u7528 <code>IndexTypeConditionSort.first</code> \u548C <code>IndexTypeConditionSort.last</code> \u8BBE\u7F6E\u9996\u4F4D\u548C\u672B\u4F4D\u7B5B\u9009\u6761\u4EF6\u3002</p><h3 id="index-method-1" tabindex="-1"><a class="header-anchor" href="#index-method-1" aria-hidden="true">#</a> index <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;">index</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeConditionSort</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>\u5F97\u5230\u4E0B\u6807\u3002</p></blockquote><h3 id="indextypeconditionsort-class" tabindex="-1"><a class="header-anchor" href="#indextypeconditionsort-class" aria-hidden="true">#</a> IndexTypeConditionSort <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;">IndexTypeConditionSort</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.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5B57\u8282\u7801\u4E0B\u6807\u6392\u5E8F\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h4 id="first-method" tabindex="-1"><a class="header-anchor" href="#first-method" aria-hidden="true">#</a> first <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;">first</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>\u8BBE\u7F6E\u6EE1\u8DB3\u6761\u4EF6\u7684\u7B2C\u4E00\u4E2A\u3002</p></blockquote><h4 id="last-method" tabindex="-1"><a class="header-anchor" href="#last-method" aria-hidden="true">#</a> last <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;">last</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>\u8BBE\u7F6E\u6EE1\u8DB3\u6761\u4EF6\u7684\u6700\u540E\u4E00\u4E2A\u3002</p></blockquote><h4 id="reverse-method" tabindex="-1"><a class="header-anchor" href="#reverse-method" aria-hidden="true">#</a> reverse <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;">reverse</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</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>\u8BBE\u7F6E\u5012\u5E8F\u4E0B\u6807\u3002</p></blockquote>`,50),l=[p];function c(t,r){return n(),o("div",null,l)}const i=s(a,[["render",c],["__file","BaseFinder.html.vue"]]);export{i as default};

View File

@@ -1 +0,0 @@
const e=JSON.parse('{"key":"v-c945cb6e","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html","title":"BaseFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[{"level":2,"title":"BaseFinder.IndexTypeCondition - class","slug":"basefinder-indextypecondition-class","link":"#basefinder-indextypecondition-class","children":[{"level":3,"title":"index - method","slug":"index-method","link":"#index-method","children":[]},{"level":3,"title":"index - method","slug":"index-method-1","link":"#index-method-1","children":[]},{"level":3,"title":"IndexTypeConditionSort - class","slug":"indextypeconditionsort-class","link":"#indextypeconditionsort-class","children":[]}]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.md"}');export{e as data};

View File

@@ -1 +0,0 @@
const e=JSON.parse('{"key":"v-740d06da","path":"/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html","title":"BaseFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[{"level":2,"title":"BaseFinder.IndexTypeCondition - class","slug":"basefinder-indextypecondition-class","link":"#basefinder-indextypecondition-class","children":[{"level":3,"title":"index - method","slug":"index-method","link":"#index-method","children":[]},{"level":3,"title":"index - method","slug":"index-method-1","link":"#index-method-1","children":[]},{"level":3,"title":"IndexTypeConditionSort - class","slug":"indextypeconditionsort-class","link":"#indextypeconditionsort-class","children":[]}]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.md"}');export{e as data};

View File

@@ -1 +0,0 @@
const e=JSON.parse('{"key":"v-6c58c435","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.md"}');export{e as data};

View File

@@ -1 +0,0 @@
import{_ as n,r as a,o as c,c as r,a as o,b as s,e as i,d as e}from"./app.cacad56c.js";const p={},l=i('<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <span class="symbol">- kt</span></h1><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8FD9\u662F\u4E00\u4E2A\u9884\u7F6E\u53CD\u5C04\u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',6),d=e("\u8BE6\u60C5\u53EF "),h={href:"https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},_=e("\u70B9\u51FB\u8FD9\u91CC"),m=e(" \u8FDB\u884C\u67E5\u770B\u3002");function u(f,y){const t=a("ExternalLinkIcon");return c(),r("div",null,[l,o("p",null,[d,o("a",h,[_,s(t)]),m])])}const g=n(p,[["render",u],["__file","ComponentTypeFactory.html.vue"]]);export{g as default};

View File

@@ -1 +0,0 @@
import{_ as n,r as c,o as a,c as r,a as o,b as s,e as p,d as e}from"./app.cacad56c.js";const d={},i=p('<h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <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\u4E00\u4E2A\u9884\u7F6E\u53CD\u5C04\u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',5),l=e("\u8BE6\u60C5\u53EF "),_={href:"https://github.com/fankes/YukiReflection/blob/master/yukireflection/src/api/kotlin/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},h=e("\u70B9\u51FB\u8FD9\u91CC"),m=e(" \u8FDB\u884C\u67E5\u770B\u3002");function f(k,y){const t=c("ExternalLinkIcon");return a(),r("div",null,[i,o("p",null,[l,o("a",_,[h,s(t)]),m])])}const b=n(d,[["render",f],["__file","ComponentTypeFactory.html.vue"]]);export{b as default};

View File

@@ -1 +0,0 @@
const e=JSON.parse('{"key":"v-7f47f9f8","path":"/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.md"}');export{e as data};

View File

@@ -1 +0,0 @@
const e=JSON.parse('{"key":"v-722cd474","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html","title":"ConstructorFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method","link":"#onnosuchconstructor-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.md"}');export{e as data};

View File

@@ -1,66 +0,0 @@
import{_ as s,o as n,c as o,e as a}from"./app.cacad56c.js";const e={},l=a(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="constructorfinder-class" tabindex="-1"><a class="header-anchor" href="#constructorfinder-class" aria-hidden="true">#</a> ConstructorFinder <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;">ConstructorFinder</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;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classSet</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;">MemberBaseFinder</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7C7B\u3002</p></blockquote><p>\u53EF\u901A\u8FC7\u6307\u5B9A\u7C7B\u578B\u67E5\u627E\u6307\u5B9A <code>Constructor</code> \u6216\u4E00\u7EC4 <code>Constructor</code>\u3002</p><h2 id="paramcount-field" tabindex="-1"><a class="header-anchor" href="#paramcount-field" aria-hidden="true">#</a> paramCount <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;">var</span><span style="color:#ADBAC7;"> paramCount</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u4E2A\u6570\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u4E0D\u4F7F\u7528 <code>param</code> \u6307\u5B9A\u53C2\u6570\u7C7B\u578B\u800C\u662F\u4EC5\u4F7F\u7528\u6B64\u53D8\u91CF\u6307\u5B9A\u53C2\u6570\u4E2A\u6570\u3002</p><p>\u82E5\u53C2\u6570\u4E2A\u6570\u5C0F\u4E8E\u96F6\u5219\u5FFD\u7565\u5E76\u4F7F\u7528 <code>param</code>\u3002</p><h2 id="modifiers-method" tabindex="-1"><a class="header-anchor" href="#modifiers-method" aria-hidden="true">#</a> modifiers <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;">modifiers</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:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u6807\u8BC6\u7B26\u7B5B\u9009\u6761\u4EF6\u3002</p></blockquote><p>\u53EF\u4E0D\u8BBE\u7F6E\u7B5B\u9009\u6761\u4EF6\uFF0C\u9ED8\u8BA4\u6A21\u7CCA\u67E5\u627E\u5E76\u53D6\u7B2C\u4E00\u4E2A\u5339\u914D\u7684 <code>Constructor</code>\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="emptyparam-method" tabindex="-1"><a class="header-anchor" href="#emptyparam-method" aria-hidden="true">#</a> emptyParam <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;">emptyParam</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u7A7A\u53C2\u6570\u3001\u65E0\u53C2\u6570\u3002</p></blockquote><h2 id="param-method" tabindex="-1"><a class="header-anchor" href="#param-method" aria-hidden="true">#</a> param <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;">param</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> paramType</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u3002</p></blockquote><p>\u5982\u679C\u540C\u65F6\u4F7F\u7528\u4E86 <code>paramCount</code> \u5219 <code>paramType</code> \u7684\u6570\u91CF\u5FC5\u987B\u4E0E <code>paramCount</code> \u5B8C\u5168\u5339\u914D\u3002</p><p>\u5982\u679C <code>Constructor</code> \u4E2D\u5B58\u5728\u4E00\u4E9B\u65E0\u610F\u4E49\u53C8\u5F88\u957F\u7684\u7C7B\u578B\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528 <a href="../../../type/defined/DefinedTypeFactory#vaguetype-field">VagueType</a> \u6765\u66FF\u4EE3\u5B83\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u65E0\u53C2 <strong>Constructor</strong> \u8BF7\u4F7F\u7528 <strong>emptyParam</strong> \u8BBE\u7F6E\u67E5\u627E\u6761\u4EF6\u3002</p><p>\u6709\u53C2 <strong>Constructor</strong> \u5FC5\u987B\u4F7F\u7528\u6B64\u65B9\u6CD5\u8BBE\u5B9A\u53C2\u6570\u6216\u4F7F\u7528 <strong>paramCount</strong> \u6307\u5B9A\u4E2A\u6570\u3002</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="param-method-1" tabindex="-1"><a class="header-anchor" href="#param-method-1" aria-hidden="true">#</a> param <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;">param</span><span style="color:#ADBAC7;">(conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ObjectsConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u6761\u4EF6\u3002</p></blockquote><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u65E0\u53C2 <strong>Constructor</strong> \u8BF7\u4F7F\u7528 <strong>emptyParam</strong> \u8BBE\u7F6E\u67E5\u627E\u6761\u4EF6\u3002</p><p>\u6709\u53C2 <strong>Constructor</strong> \u5FC5\u987B\u4F7F\u7528\u6B64\u65B9\u6CD5\u8BBE\u5B9A\u53C2\u6570\u6216\u4F7F\u7528 <strong>paramCount</strong> \u6307\u5B9A\u4E2A\u6570\u3002</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="paramcount-method" tabindex="-1"><a class="header-anchor" href="#paramcount-method" aria-hidden="true">#</a> paramCount <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;">paramCount</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u4E2A\u6570\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u4E0D\u4F7F\u7528 <code>param</code> \u6307\u5B9A\u53C2\u6570\u7C7B\u578B\u800C\u662F\u4EC5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6307\u5B9A\u53C2\u6570\u4E2A\u6570\u3002</p><p>\u82E5\u53C2\u6570\u4E2A\u6570\u5C0F\u4E8E\u96F6\u5219\u5FFD\u7565\u5E76\u4F7F\u7528 <code>param</code>\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="paramcount-method-1" tabindex="-1"><a class="header-anchor" href="#paramcount-method-1" aria-hidden="true">#</a> paramCount <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;">paramCount</span><span style="color:#ADBAC7;">(numRange</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IntRange</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u4E2A\u6570\u8303\u56F4\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u4E0D\u4F7F\u7528 <code>param</code> \u6307\u5B9A\u53C2\u6570\u7C7B\u578B\u800C\u662F\u4EC5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6307\u5B9A\u53C2\u6570\u4E2A\u6570\u8303\u56F4\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="paramcount-method-2" tabindex="-1"><a class="header-anchor" href="#paramcount-method-2" aria-hidden="true">#</a> paramCount <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;">paramCount</span><span style="color:#ADBAC7;">(conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">CountConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u4E2A\u6570\u6761\u4EF6\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u4E0D\u4F7F\u7528 <code>param</code> \u6307\u5B9A\u53C2\u6570\u7C7B\u578B\u800C\u662F\u4EC5\u4F7F\u7528\u6B64\u65B9\u6CD5\u6307\u5B9A\u53C2\u6570\u4E2A\u6570\u6761\u4EF6\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="superclass-method" tabindex="-1"><a class="header-anchor" href="#superclass-method" aria-hidden="true">#</a> superClass <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;">superClass</span><span style="color:#ADBAC7;">(isOnlySuperClass</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u5728 <code>classSet</code> \u7684\u6240\u6709\u7236\u7C7B\u4E2D\u67E5\u627E\u5F53\u524D <code>Constructor</code>\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">Notice</p><p>\u82E5\u5F53\u524D <strong>classSet</strong> \u7684\u7236\u7C7B\u8F83\u591A\u53EF\u80FD\u4F1A\u8017\u65F6\uFF0CAPI \u4F1A\u81EA\u52A8\u5FAA\u73AF\u5230\u7236\u7C7B\u7EE7\u627F\u662F <strong>Any</strong> \u524D\u7684\u6700\u540E\u4E00\u4E2A\u7C7B\u3002</p></div><h2 id="remedyplan-class" tabindex="-1"><a class="header-anchor" href="#remedyplan-class" aria-hidden="true">#</a> RemedyPlan <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;">RemedyPlan</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u91CD\u67E5\u627E\u5B9E\u73B0\u7C7B\uFF0C\u53EF\u7D2F\u8BA1\u5931\u8D25\u6B21\u6570\u76F4\u5230\u67E5\u627E\u6210\u529F\u3002</p></blockquote><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>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u521B\u5EFA\u9700\u8981\u91CD\u65B0\u67E5\u627E\u7684 <code>Constructor</code>\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u6DFB\u52A0\u591A\u4E2A\u5907\u9009 <code>Constructor</code>\uFF0C\u76F4\u5230\u6210\u529F\u4E3A\u6B62\uFF0C\u82E5\u6700\u540E\u4F9D\u7136\u5931\u8D25\uFF0C\u5C06\u505C\u6B62\u67E5\u627E\u5E76\u8F93\u51FA\u9519\u8BEF\u65E5\u5FD7\u3002</p><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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>RemedyPlan</code> \u7ED3\u679C\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h4 id="onfind-method" tabindex="-1"><a class="header-anchor" href="#onfind-method" aria-hidden="true">#</a> onFind <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;">onFind</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HashSet</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">Constructor</span><span style="color:#F47067;">&lt;*&gt;&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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5F53\u5728 <code>RemedyPlan</code> \u4E2D\u627E\u5230\u7ED3\u679C\u65F6\u3002</p></blockquote><p><strong>Function Example</strong></p><p>\u4F60\u53EF\u4EE5\u65B9\u4FBF\u5730\u5BF9\u91CD\u67E5\u627E\u7684 <code>Constructor</code> \u5B9E\u73B0 <code>onFind</code> \u65B9\u6CD5\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.onFind {</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></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 style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> isNoSuch</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;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> throwable</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;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">BaseResult</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7ED3\u679C\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="result-method" tabindex="-1"><a class="header-anchor" href="#result-method" 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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u521B\u5EFA\u76D1\u542C\u7ED3\u679C\u4E8B\u4EF6\u65B9\u6CD5\u4F53\u3002</p></blockquote><p><strong>Function Example</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528 <code>lambda</code> \u5F62\u5F0F\u521B\u5EFA <code>Result</code> \u7C7B\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.result {</span></span>
<span class="line"><span style="color:#ADBAC7;"> get().call()</span></span>
<span class="line"><span style="color:#ADBAC7;"> all()</span></span>
<span class="line"><span style="color:#ADBAC7;"> remedys {}</span></span>
<span class="line"><span style="color:#ADBAC7;"> onNoSuchConstructor {}</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><h3 id="get-method" tabindex="-1"><a class="header-anchor" href="#get-method" aria-hidden="true">#</a> get <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;">get</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Instance</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u83B7\u5F97 <code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u3002</p></blockquote><p>\u82E5\u6709\u591A\u4E2A <code>Constructor</code> \u7ED3\u679C\u53EA\u4F1A\u8FD4\u56DE\u7B2C\u4E00\u4E2A\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u82E5\u4F60\u8BBE\u7F6E\u4E86 <strong>remedys</strong> \u8BF7\u4F7F\u7528 <strong>wait</strong> \u56DE\u8C03\u7ED3\u679C\u65B9\u6CD5\u3002</p></div><p><strong>Function Example</strong></p><p>\u4F60\u53EF\u4EE5\u901A\u8FC7\u83B7\u5F97\u65B9\u6CD5\u6240\u5728\u5B9E\u4F8B\u6765\u6267\u884C\u6784\u9020\u65B9\u6CD5\u521B\u5EFA\u65B0\u7684\u5B9E\u4F8B\u5BF9\u8C61\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.get().call()</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\u53EF\u4EE5 <code>cast</code> \u6784\u9020\u65B9\u6CD5\u4E3A\u6307\u5B9A\u7C7B\u578B\u7684\u5B9E\u4F8B\u5BF9\u8C61\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.get().newInstance</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">TestClass</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 class="line-number"></div></div></div><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u82E5\u6784\u9020\u65B9\u6CD5\u542B\u6709\u53C2\u6570\u5219\u540E\u65B9\u53C2\u6570\u5FC5\u586B\u3002</p></div><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.get().newInstance</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">TestClass</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;param1&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">&quot;param2&quot;</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 class="line-number"></div></div></div><h3 id="all-method" tabindex="-1"><a class="header-anchor" href="#all-method" aria-hidden="true">#</a> all <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;">all</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ArrayList</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">Instance</span><span style="color:#F47067;">&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u83B7\u5F97 <code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u6570\u7EC4\u3002</p></blockquote><p>\u8FD4\u56DE\u5168\u90E8\u67E5\u627E\u6761\u4EF6\u5339\u914D\u7684\u591A\u4E2A <code>Constructor</code> \u5B9E\u4F8B\u7ED3\u679C\u3002</p><p><strong>Function Example</strong></p><p>\u4F60\u53EF\u4EE5\u901A\u8FC7\u6B64\u65B9\u6CD5\u6765\u83B7\u5F97\u5F53\u524D\u6761\u4EF6\u7ED3\u679C\u4E2D\u5339\u914D\u7684\u5168\u90E8 <code>Constructor</code>\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.all().forEach { instance </span><span style="color:#F47067;">-&gt;</span></span>
<span class="line"><span style="color:#ADBAC7;"> instance.call(...)</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><h3 id="give-method" tabindex="-1"><a class="header-anchor" href="#give-method" aria-hidden="true">#</a> give <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;">give</span><span style="color:#ADBAC7;">()</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>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5F97\u5230 <code>Constructor</code> \u672C\u8EAB\u3002</p></blockquote><p>\u82E5\u6709\u591A\u4E2A <code>Constructor</code> \u7ED3\u679C\u53EA\u4F1A\u8FD4\u56DE\u7B2C\u4E00\u4E2A\u3002</p><p>\u5728\u67E5\u627E\u6761\u4EF6\u627E\u4E0D\u5230\u4EFB\u4F55\u7ED3\u679C\u7684\u65F6\u5019\u5C06\u8FD4\u56DE <code>null</code>\u3002</p><h3 id="giveall-method" tabindex="-1"><a class="header-anchor" href="#giveall-method" aria-hidden="true">#</a> giveAll <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;">giveAll</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">HashSet</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">Constructor</span><span style="color:#F47067;">&lt;*&gt;&gt;</span></span>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5F97\u5230 <code>Constructor</code> \u672C\u8EAB\u6570\u7EC4\u3002</p></blockquote><p>\u8FD4\u56DE\u5168\u90E8\u67E5\u627E\u6761\u4EF6\u5339\u914D\u7684\u591A\u4E2A <code>Constructor</code> \u5B9E\u4F8B\u3002</p><p>\u5728\u67E5\u627E\u6761\u4EF6\u627E\u4E0D\u5230\u4EFB\u4F55\u7ED3\u679C\u7684\u65F6\u5019\u5C06\u8FD4\u56DE\u7A7A\u7684 <code>HashSet</code>\u3002</p><h3 id="wait-method" tabindex="-1"><a class="header-anchor" href="#wait-method" aria-hidden="true">#</a> wait <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;">wait</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Instance</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u83B7\u5F97 <code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\uFF0C\u914D\u5408 <code>RemedyPlan</code> \u4F7F\u7528\u3002</p></blockquote><p>\u82E5\u6709\u591A\u4E2A <code>Constructor</code> \u7ED3\u679C\u53EA\u4F1A\u8FD4\u56DE\u7B2C\u4E00\u4E2A\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u82E5\u4F60\u8BBE\u7F6E\u4E86 <strong>remedys</strong> \u5FC5\u987B\u4F7F\u7528\u6B64\u65B9\u6CD5\u624D\u80FD\u83B7\u5F97\u7ED3\u679C\u3002</p><p>\u82E5\u4F60\u6CA1\u6709\u8BBE\u7F6E <strong>remedys</strong> \u6B64\u65B9\u6CD5\u5C06\u4E0D\u4F1A\u88AB\u56DE\u8C03\u3002</p></div><h3 id="waitall-method" tabindex="-1"><a class="header-anchor" href="#waitall-method" aria-hidden="true">#</a> waitAll <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;">waitAll</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ArrayList</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">Instance</span><span style="color:#F47067;">&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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u83B7\u5F97 <code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u6570\u7EC4\uFF0C\u914D\u5408 <code>RemedyPlan</code> \u4F7F\u7528\u3002</p></blockquote><p>\u8FD4\u56DE\u5168\u90E8\u67E5\u627E\u6761\u4EF6\u5339\u914D\u7684\u591A\u4E2A <code>Constructor</code> \u5B9E\u4F8B\u7ED3\u679C\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u82E5\u4F60\u8BBE\u7F6E\u4E86 <strong>remedys</strong> \u5FC5\u987B\u4F7F\u7528\u6B64\u65B9\u6CD5\u624D\u80FD\u83B7\u5F97\u7ED3\u679C\u3002</p><p>\u82E5\u4F60\u6CA1\u6709\u8BBE\u7F6E <strong>remedys</strong> \u6B64\u65B9\u6CD5\u5C06\u4E0D\u4F1A\u88AB\u56DE\u8C03\u3002</p></div><h3 id="remedys-method" tabindex="-1"><a class="header-anchor" href="#remedys-method" aria-hidden="true">#</a> remedys <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;">remedys</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RemedyPlan</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u521B\u5EFA <code>Constructor</code> \u91CD\u67E5\u627E\u529F\u80FD\u3002</p></blockquote><p><strong>Function Example</strong></p><p>\u5F53\u4F60\u9047\u5230\u4E00\u79CD <code>Constructor</code> \u53EF\u80FD\u5B58\u5728\u4E0D\u540C\u5F62\u5F0F\u7684\u5B58\u5728\u65F6\uFF0C\u53EF\u4EE5\u4F7F\u7528 <code>RemedyPlan</code> \u91CD\u65B0\u67E5\u627E\u5B83\uFF0C\u800C\u6CA1\u6709\u5FC5\u8981\u4F7F\u7528 <code>onNoSuchConstructor</code> \u6355\u83B7\u5F02\u5E38\u4E8C\u6B21\u67E5\u627E <code>Constructor</code>\u3002</p><p>\u82E5\u7B2C\u4E00\u6B21\u67E5\u627E\u5931\u8D25\u4E86\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u8FD9\u91CC\u7EE7\u7EED\u6DFB\u52A0\u6B64\u65B9\u6CD5\u4F53\u76F4\u5230\u6210\u529F\u4E3A\u6B62\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</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;">}.remedys {</span></span>
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</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 style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</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 style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="onnosuchconstructor-method" tabindex="-1"><a class="header-anchor" href="#onnosuchconstructor-method" aria-hidden="true">#</a> onNoSuchConstructor <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;">onNoSuchConstructor</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u76D1\u542C\u627E\u4E0D\u5230 <code>Constructor</code> \u65F6\u3002</p></blockquote><p>\u53EA\u4F1A\u8FD4\u56DE\u7B2C\u4E00\u6B21\u7684\u9519\u8BEF\u4FE1\u606F\uFF0C\u4E0D\u4F1A\u8FD4\u56DE <code>RemedyPlan</code> \u7684\u9519\u8BEF\u4FE1\u606F\u3002</p><h3 id="ignored-method" tabindex="-1"><a class="header-anchor" href="#ignored-method" aria-hidden="true">#</a> ignored <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;">ignored</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5FFD\u7565\u5F02\u5E38\u5E76\u505C\u6B62\u6253\u5370\u4EFB\u4F55\u9519\u8BEF\u65E5\u5FD7\u3002</p></blockquote><div class="custom-container warning"><p class="custom-container-title">Notice</p><p>\u6B64\u65F6\u82E5\u8981\u76D1\u542C\u5F02\u5E38\u7ED3\u679C\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u5B9E\u73B0 <strong>onNoSuchConstructor</strong> \u65B9\u6CD5\u3002</p></div><h3 id="instance-class" tabindex="-1"><a class="header-anchor" href="#instance-class" aria-hidden="true">#</a> Instance <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;">Instance</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;"> 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>
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u3002</p></blockquote><h4 id="call-method" tabindex="-1"><a class="header-anchor" href="#call-method" aria-hidden="true">#</a> call <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;">call</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;">)</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><p><strong>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B\uFF0C\u4E0D\u6307\u5B9A\u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote><h4 id="newinstance-method" tabindex="-1"><a class="header-anchor" href="#newinstance-method" aria-hidden="true">#</a> newInstance <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:#F47067;">&lt;</span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">&gt;</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">newInstance</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;">)</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>Change Records</strong></p><p><code>v1.0.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B \uFF0C\u6307\u5B9A <code>T</code> \u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote>`,227),p=[l];function t(c,r){return n(),o("div",null,p)}const i=s(e,[["render",t],["__file","ConstructorFinder.html.vue"]]);export{i as default};

Some files were not shown because too many files have changed in this diff Show More