Full Code of jiangguilong2000/gamioo for AI

master 0b3ff272d8d4 cached
272 files
709.3 KB
202.3k tokens
1632 symbols
1 requests
Download .txt
Showing preview only (864K chars total). Download the full file or copy to clipboard to get everything.
Repository: jiangguilong2000/gamioo
Branch: master
Commit: 0b3ff272d8d4
Files: 272
Total size: 709.3 KB

Directory structure:
gitextract_bng3r18m/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── gradle-publish.yml
│       └── gradle.yml
├── .gitignore
├── .settings/
│   └── .gitignore
├── LICENSE
├── README.en-US.md
├── README.md
├── _config.yml
├── build.gradle
├── docs/
│   ├── _config.yml
│   └── index.md
├── gamioo-cache/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       └── jmh/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── cache/
│                           └── CacheBenchMark.java
├── gamioo-common/
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── common/
│       │                   ├── concurrent/
│       │                   │   ├── Group.java
│       │                   │   └── NameableThreadFactory.java
│       │                   ├── constant/
│       │                   │   ├── CacheConstant.java
│       │                   │   ├── Describe.java
│       │                   │   ├── ModuleConstant.java
│       │                   │   ├── SystemConstant.java
│       │                   │   └── TimeConstant.java
│       │                   ├── exception/
│       │                   │   ├── BeansException.java
│       │                   │   ├── NestedIOException.java
│       │                   │   ├── NoPublicFieldException.java
│       │                   │   ├── NoPublicMethodException.java
│       │                   │   ├── ServerBootstrapException.java
│       │                   │   └── ServiceException.java
│       │                   ├── http/
│       │                   │   └── RequestMethod.java
│       │                   ├── lang/
│       │                   │   ├── Cache.java
│       │                   │   ├── Server.java
│       │                   │   └── ServerInfo.java
│       │                   ├── shape/
│       │                   │   ├── AABB.java
│       │                   │   ├── Point.java
│       │                   │   ├── Sector.java
│       │                   │   └── Shape.java
│       │                   ├── util/
│       │                   │   ├── AnnotationUtils.java
│       │                   │   ├── ArrayUtils.java
│       │                   │   ├── Assert.java
│       │                   │   ├── ByteArrayUtils.java
│       │                   │   ├── CharsetUtils.java
│       │                   │   ├── ClassUtils.java
│       │                   │   ├── FieldUtils.java
│       │                   │   ├── FileUtils.java
│       │                   │   ├── JSONUtils.java
│       │                   │   ├── JVMUtil.java
│       │                   │   ├── JsonXmlUtil.java
│       │                   │   ├── MathUtils.java
│       │                   │   ├── MethodUtils.java
│       │                   │   ├── NativeUtils.java
│       │                   │   ├── RandomUtils.java
│       │                   │   ├── ResourceUtils.java
│       │                   │   ├── StringUtils.java
│       │                   │   ├── TelnetUtils.java
│       │                   │   ├── ThreadUtils.java
│       │                   │   └── XMLUtil.java
│       │                   └── vector/
│       │                       ├── Vector2f.java
│       │                       └── Vector3f.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           ├── JsonXmlUtilTest.java
│           │           └── MainT.java
│           └── resources/
│               ├── gate-config.xml
│               ├── junit-platform.properties
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-compress/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── compress/
│       │   │               ├── CompressBenchMark.java
│       │   │               └── SimilarityBenchMark.java
│       │   └── resources/
│       │       ├── message.txt
│       │       ├── mini.txt
│       │       ├── readu.txt
│       │       └── short.txt
│       └── main/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── compress/
│           │               ├── Main.java
│           │               └── ZlibUtil.java
│           └── resources/
│               └── message.txt
├── gamioo-config/
│   ├── build.gradle
│   └── src/
│       └── main/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── config/
│                           ├── NacosUtil.java
│                           ├── ServerConfig.java
│                           └── ServerConfigManager.java
├── gamioo-event/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── event/
│       │                   ├── EventService.java
│       │                   └── package-info.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── event/
│           │               └── guava/
│           │                   ├── BaseEvent.java
│           │                   ├── MainT.java
│           │                   ├── StageEventHandler.java
│           │                   ├── UserEventHandler.java
│           │                   └── UserLoginEvent.java
│           └── resources/
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-game/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── game/
│       │                   ├── Main.java
│       │                   ├── activity/
│       │                   │   └── package-info.java
│       │                   └── word/
│       │                       ├── DirtyWordUnit.java
│       │                       ├── DirtyWordsReader.java
│       │                       └── DirtyWordsValidator.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── game/
│           │               ├── BalanceBusinessExecutorTest.java
│           │               └── DeviationDTO.java
│           └── resources/
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-ioc/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── ioc/
│       │                   ├── PropertyValue.java
│       │                   ├── PropertyValues.java
│       │                   ├── annotation/
│       │                   │   ├── AnnotationAttributes.java
│       │                   │   ├── AnnotationBeanDefinitionReader.java
│       │                   │   ├── Attribute.java
│       │                   │   ├── Bean.java
│       │                   │   ├── CommandMapping.java
│       │                   │   ├── Configuration.java
│       │                   │   ├── DefaultResourceLoader.java
│       │                   │   ├── Mapping.java
│       │                   │   ├── RequestMapping.java
│       │                   │   ├── Scheduled.java
│       │                   │   ├── Subscribe.java
│       │                   │   └── Value.java
│       │                   ├── config/
│       │                   │   ├── BeanFactoryPostProcessor.java
│       │                   │   ├── BeanPostProcessor.java
│       │                   │   └── BeanReference.java
│       │                   ├── context/
│       │                   │   ├── ApplicationContext.java
│       │                   │   ├── ClassPathBeanDefinitionScanner.java
│       │                   │   └── ConfigApplicationContext.java
│       │                   ├── definition/
│       │                   │   ├── BeanDefinition.java
│       │                   │   ├── ConfigurationBeanDefinition.java
│       │                   │   ├── ControllerBeanDefinition.java
│       │                   │   ├── Definition.java
│       │                   │   ├── FieldDefinition.java
│       │                   │   ├── GenericBeanDefinition.java
│       │                   │   ├── GenericFieldDefinition.java
│       │                   │   ├── GenericMethodDefinition.java
│       │                   │   ├── ListFieldDefinition.java
│       │                   │   ├── MapFieldDefinition.java
│       │                   │   ├── MethodDefinition.java
│       │                   │   └── ResourceBeanDefinition.java
│       │                   ├── factory/
│       │                   │   ├── BeanFactory.java
│       │                   │   ├── ObjectFactory.java
│       │                   │   ├── annotation/
│       │                   │   │   └── Autowired.java
│       │                   │   ├── support/
│       │                   │   │   ├── AbstractAutowireCapableBeanFactory.java
│       │                   │   │   ├── AbstractBeanDefinition.java
│       │                   │   │   ├── AbstractBeanDefinitionReader.java
│       │                   │   │   ├── AbstractBeanFactory.java
│       │                   │   │   ├── BeanDefinitionReader.java
│       │                   │   │   └── DefaultListableBeanFactory.java
│       │                   │   └── xml/
│       │                   │       ├── XmlBeanDefinitionReader.java
│       │                   │       └── XmlResourceLoader.java
│       │                   ├── io/
│       │                   │   ├── AbstractResource.java
│       │                   │   ├── FileClassResource.java
│       │                   │   ├── JarClassResource.java
│       │                   │   ├── Resource.java
│       │                   │   ├── ResourceCallback.java
│       │                   │   ├── ResourceLoader.java
│       │                   │   └── UrlFileResource.java
│       │                   ├── stereotype/
│       │                   │   ├── Component.java
│       │                   │   ├── Controller.java
│       │                   │   ├── Repository.java
│       │                   │   ├── Resource.java
│       │                   │   ├── Service.java
│       │                   │   └── package-info.java
│       │                   ├── type/
│       │                   │   ├── AnnotatedTypeMetadata.java
│       │                   │   ├── AnnotationMetadata.java
│       │                   │   ├── ClassMetadata.java
│       │                   │   ├── MethodMetadata.java
│       │                   │   └── classreading/
│       │                   │       ├── AnnotationMetadataReadingVisitor.java
│       │                   │       ├── ClassMetadataReadingVisitor.java
│       │                   │       └── MetadataReader.java
│       │                   └── wrapper/
│       │                       ├── BeanWrapper.java
│       │                       ├── Command.java
│       │                       └── MethodWrapper.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── ioc/
│           │               ├── DebugService.java
│           │               ├── IOCFactoryTest.java
│           │               ├── MapTest.java
│           │               ├── RoleService.java
│           │               ├── SkillService.java
│           │               ├── XmlBeanFactoryTest.java
│           │               ├── action/
│           │               │   └── UserController.java
│           │               ├── entity/
│           │               │   ├── Cache.java
│           │               │   ├── DB.java
│           │               │   ├── Server.java
│           │               │   └── ServerConfig.java
│           │               ├── map/
│           │               │   ├── AddItemCommand.java
│           │               │   ├── AddMoneyCommand.java
│           │               │   ├── AddRmbCommand.java
│           │               │   └── Command.java
│           │               └── skill/
│           │                   ├── AbstractSkill.java
│           │                   ├── SkillA.java
│           │                   └── SkillB.java
│           └── resources/
│               ├── gate-config.xml
│               ├── ioc.xml
│               ├── junit-platform.properties
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-log/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── log/
│       │   │               ├── MainT.java
│       │   │               └── package-info.java
│       │   └── resources/
│       │       ├── log4j2.component.properties
│       │       └── log4j2.xml
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── log/
│           │               └── Main.java
│           └── resources/
│               └── log4j2.xml
├── gamioo-navigation/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── nav/
│       │                   └── NavEngineBenchMark.java
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── nav/
│       │                   ├── Easy3dNav.java
│       │                   ├── INav.java
│       │                   ├── Main.java
│       │                   └── NavEngine.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── nav/
│                           └── NavEngineTest.java
├── gamioo-network/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── network/
│       │                   ├── package-info.java
│       │                   └── util/
│       │                       └── IPUtil.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── network/
│                           └── MainT.java
├── gamioo-orm/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── orm/
│       │                   ├── OrmService.java
│       │                   └── package-info.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── orm/
│                           └── MainT.java
├── gamioo-protocol/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── protocol/
│       │                   ├── ProtocolService.java
│       │                   └── package-info.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── protocol/
│                           └── MainT.java
├── gamioo-redis/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── redis/
│       │                   ├── Redis.java
│       │                   ├── RedisConstant.java
│       │                   └── zset/
│       │                       ├── ZSetUtils.java
│       │                       ├── generic/
│       │                       │   ├── Entry.java
│       │                       │   ├── GenericZSet.java
│       │                       │   ├── ScoreHandler.java
│       │                       │   ├── ScoreHandlers.java
│       │                       │   ├── ScoreRangeSpec.java
│       │                       │   └── ZScoreRangeSpec.java
│       │                       ├── long2object/
│       │                       │   ├── Long2ObjectEntry.java
│       │                       │   └── Long2ObjectZSet.java
│       │                       └── object2long/
│       │                           ├── LongScoreHandler.java
│       │                           ├── LongScoreHandlers.java
│       │                           ├── LongScoreRangeSpec.java
│       │                           ├── Object2LongEntry.java
│       │                           ├── Object2LongZSet.java
│       │                           └── ZLongScoreRangeSpec.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── redis/
│                           └── zset/
│                               ├── generic/
│                               │   └── GenericZSetTest.java
│                               ├── long2object/
│                               │   └── Long2ObjectZSetTest.java
│                               └── object2long/
│                                   └── Object2LongZSetTest.java
├── gamioo-sandbox/
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── sandbox/
│       │   │               ├── AsymmetricBenchMark.java
│       │   │               ├── InterruptBenchmark.java
│       │   │               ├── MapBenchMark.java
│       │   │               ├── ProtoDeserializeBenchMark.java
│       │   │               ├── ProtoSerializeBenchMark.java
│       │   │               └── SymmetricBenchmark.java
│       │   └── resources/
│       │       └── message.txt
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── sandbox/
│       │                   ├── HarmDTO.java
│       │                   ├── LoginGame_S2C_Msg.java
│       │                   ├── SerializingUtil.java
│       │                   ├── SkillCategory.java
│       │                   └── SkillFire_S2C_Msg.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── sandbox/
│           │               ├── AnsibleTest.java
│           │               ├── Base64Test.java
│           │               ├── BitMapTest.java
│           │               ├── CryptoTest.java
│           │               └── ProtoTest.java
│           └── resources/
│               └── message.txt
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── version.properties

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat           text eol=crlf



================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/workflows/gradle-publish.yml
================================================
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
  release:
    types: [created]

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
    - name: Checkout Code
      uses: actions/checkout@v3.3.0
    - name: Set up JDK 8
      uses: actions/setup-java@v3.10.0
      with:
        java-version: '8'
        distribution: 'temurin'
        server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
        settings-path: ${{ github.workspace }} # location for the settings.xml file
    - name: Run chmod to make gradlew executable
      run: chmod +x ./gradlew
    - name: Build with Gradle
      uses: gradle/gradle-build-action@v2.4.0
      with:
        arguments: build

    # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
    # the publishing section of your build.gradle
    - name: Publish to GitHub Packages
      uses: gradle/gradle-build-action@v2.4.0
      with:
        arguments: publish
      env:
        USERNAME: ${{ github.actor }}
        TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/gradle.yml
================================================
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: build

on: [ "push", "pull_request" ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v3.3.0
      - name: Set up JDK 8
        uses: actions/setup-java@v3.10.0
        with:
          java-version: '8'
          distribution: 'temurin'
      - name: Run chmod to make gradlew executable
        run: chmod +x ./gradlew
      - name: Clean with Gradle
        uses: gradle/gradle-build-action@v2.4.0
        with:
          arguments: clean
      - name: Build with Gradle
        uses: gradle/gradle-build-action@v2.4.0
        with:
          arguments: build --scan
      - name: Coverage with Gradle
        uses: gradle/gradle-build-action@v2.4.0
        with:
          arguments: coverage
      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v3.1.1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
  finish:
    needs: build
    runs-on: ubuntu-latest
    if: ${{success()}}
    steps:
      - run: echo "Build successfully on branch ${{ github.actor }}"




================================================
FILE: .gitignore
================================================
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
/.project
/gamioo-log/.project
/gamioo-log/.classpath
/gamioo-ioc/.project
/gamioo-ioc/.classpath
/gamioo-game/.classpath
/gamioo-game/.project
/gamioo-compress/.classpath
/gamioo-compress/.project
/gamioo-compress/.settings/*.prefs
/gamioo-cache/.classpath
/gamioo-cache/.project
/gamioo-cache/.settings/org.eclipse.buildship.core.prefs
/测试结果 -BeanFactoryTest.html
/gamioo-beans/.settings/*.prefs
/.idea
/gamioo-beans/.project
/gamioo-beans/.classpath
/gamioo-pomelo/out/production/classes/com/zvidia/pomelo/exception/*.class
/gamioo-pomelo/out/production/classes/com/zvidia/pomelo/protobuf/*.class
/gamioo-pomelo/out/production/classes/com/zvidia/pomelo/protocol/*.class
/gamioo-pomelo/out/production/classes/com/zvidia/pomelo/utils/*.class
/gamioo-pomelo/out/production/classes/com/zvidia/pomelo/websocket/*.class
/gamioo-pomelo/out/production/classes/io/gamioo/pomelo/*.class
/gamioo-pomelo/out/production/classes/org/java_websocket/drafts/*.class
/gamioo-pomelo/out/production/resources/log4j2.component.properties
/gamioo-pomelo/out/production/resources/log4j2.xml
/gamioo-sandbox/src/jmh/generated


================================================
FILE: .settings/.gitignore
================================================
/org.eclipse.buildship.core.prefs


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "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 [yyyy] [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

       http://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.


================================================
FILE: README.en-US.md
================================================
<p align="center">
  <img src="https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png" width="100">
</p>
<p align="center">
	<strong>Game , so easy.</strong>
</p>
<p align="center">
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml">
		<img src="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml/badge.svg" ></img>
	</a>
	<a target="_blank" href="https://codecov.io/gh/jiangguilong2000/gamioo-navigation">
		<img src="https://codecov.io/gh/jiangguilong2000/gamioo-navigation/branch/main/graph/badge.svg?token=QBSoQmUNnn" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/releases">
		<img src="https://img.shields.io/github/release/jiangguilong2000/gamioo-navigation.svg" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/commits">
		<img src="https://img.shields.io/github/last-commit/jiangguilong2000/gamioo-navigation.svg?style=flat-square" ></img>
	</a>
	<a target="_blank" href="https://justauth.wiki" title="参考文档">
		<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
	</a>
	<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html" >
		<img src="https://img.shields.io/badge/JDK-1.8%2B-green.svg" ></img>
	</a>
	<a href="https://www.apache.org/licenses/LICENSE-2.0.html">
		<img src="https://img.shields.io/badge/license-Apache%202-4EB1BA.svg" />
	</a>
	<a target="_blank" href='https://github.com/jiangguilong2000/gamioo'>
		<img src="https://img.shields.io/github/stars/jiangguilong2000/gamioo.svg?style=social" alt="github star"></img>
	</a>
</p>

##### Language: [中文](README.md) | English

`gamioo`, as you see, It is a Game server framework, based on this framework, you can quickly implement a highly available, easy to maintain, stable and high-performance game server.

## Features

1. **one**: Has integrated more than a dozen third-party platforms.
2. **two**: The minimalist design is very simple to use.

## Quick start

### Add maven dependency

- Add JustAuth dependency

These artifacts are available from Maven Central:

```xml

<dependency>
    <groupId>io.gamioo</groupId>
    <artifactId>gamioo-all</artifactId>
    <version>{latest-version}</version>
</dependency>
```

- Add http dependency(Only need one)

> If there is already in the project, please ignore it. In addition, you need to pay special attention. If the low version of the dependency has been introduced in the project, please exclude the low
> version of the dependency first, and then introduce the high version or the latest version of the dependency

### Using Gamioo API

#### Simple

```java

```

## Contributions

1. Fork this project to your repository
2. Clone the project after fork.
3. Modify the code (either to fix issue, or to add new features)
4. Commit and push code to a remote repository
5. Create a new PR (pull request), and select `dev` branch
6. Waiting for author to merge

I look forward to your joining us.

## Contributors

[contributors](https://gamioo.wiki/contributors.html)

## Change Logs

[CHANGELOGS](https://gamioo.wiki/update.html)

## Recommend

## References


================================================
FILE: README.md
================================================
<p align="center">
  <img src="https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png" width="100">
</p>
<p align="center">
	<strong>Game , so easy.</strong>
</p>

<p align="center">
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml">
		<img src="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml/badge.svg" ></img>
	</a>
	<a target="_blank" href="https://codecov.io/gh/jiangguilong2000/gamioo-navigation">
		<img src="https://codecov.io/gh/jiangguilong2000/gamioo-navigation/branch/main/graph/badge.svg?token=QBSoQmUNnn" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/releases">
		<img src="https://img.shields.io/github/release/jiangguilong2000/gamioo-navigation.svg" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/commits">
		<img src="https://img.shields.io/github/last-commit/jiangguilong2000/gamioo-navigation.svg?style=flat-square" ></img>
	</a>
	<a target="_blank" href="https://justauth.wiki" title="参考文档">
		<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
	</a>
	<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html" >
		<img src="https://img.shields.io/badge/JDK-1.8%2B-green.svg" ></img>
	</a>
	<a href="https://www.apache.org/licenses/LICENSE-2.0.html">
		<img src="https://img.shields.io/badge/license-Apache%202-4EB1BA.svg" />
	</a>
	<a target="_blank" href='https://github.com/jiangguilong2000/gamioo'>
		<img src="https://img.shields.io/github/stars/jiangguilong2000/gamioo.svg?style=social" alt="github star"></img>
	</a>
</p>

##### 语言: 中文 | [English](README.en-US.md)

## 📌 简介

Game server framework, based on this framework, you can quickly implement a highly available, easy to maintain, stable and high-performance game server.

## 🔧 功能特点

## 📄文件结构

## TODO list


================================================
FILE: _config.yml
================================================
theme: jekyll-theme-architect

================================================
FILE: build.gradle
================================================
def releaseTime;
def times;
ext {
    Properties properties = new Properties()
    String fileName = "version.properties"
    File propertyFile = new File(rootDir.getAbsoluteFile(), fileName)
    properties.load(propertyFile.newDataInputStream())
    String lastReleaseTime = properties["date"];
    times = Integer.parseInt(properties["release"]);
    releaseTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00"));
    if (lastReleaseTime != releaseTime) {
        properties["date"] = releaseTime;
        times = 1;
    } else {
        times++;
    }
    properties["release"] = String.valueOf(times);
    properties.store(propertyFile.newDataOutputStream(), "version info");
}
buildscript {
    repositories {
        maven {
            url = uri("https://plugins.gradle.org/m2/")
        }
    }
    dependencies {
        classpath("me.champeau.jmh:jmh-gradle-plugin:0.6.8")
    }
}

subprojects {

    apply plugin: 'java-library';
    apply plugin: 'maven-publish';
    apply plugin: 'signing';
    apply plugin: 'jacoco';
    apply plugin: "me.champeau.jmh";

    group = 'io.gamioo';
    version = '0.2.14';
//	version = '0.0.1-SNAPSHOT';
    ext {
        releaseRoot = '../../dist'
    }

    sourceCompatibility = 11;
    targetCompatibility = 11;
    compileJava {
        options.encoding = 'UTF-8'
        options.compilerArgs << '-XDignore.symbol.file'
        options.fork = true
        options.forkOptions.executable = 'javac'
    }

    [compileJava, compileTestJava]*.options*.encoding = 'UTF-8';

    tasks.withType(JavaCompile) {
        options.encoding = 'UTF-8'
    }


    tasks.withType(Test) {
        systemProperty "project.name", project.name;
    }


/**
 * 定义资源集
 * main源码包
 * test单测包
 * jmh基准测试包
 */
    sourceSets {
        main
        test
        jmh
    }

    /**创建java和resource目录*/
    task createDirs {
        //     println project.name + ":createDirs"
        sourceSets*.java.srcDirs*.each { it.mkdirs() }
        sourceSets*.resources.srcDirs*.each { it.mkdirs() }
    }

    jar {
        enabled = true
        archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}";
        manifest.attributes provider: 'Allen Jiang';
        manifest.attributes["Created-By"] = "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})";
        manifest.attributes["Implementation-Title"] = project.name;
        manifest.attributes["Implementation-Version"] = 'git rev-parse --abbrev-ref HEAD'.execute([], project.rootDir).text.trim() + "-" + 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() + "-" + 'git rev-list HEAD --count'.execute([], project.rootDir).text.trim() + "-S" + releaseTime + "R" + times;
    }


    javadoc {
        options {
            encoding "UTF-8";
            charSet 'UTF-8';
            author true;
            version true;
            header = project.name;
            links "http://docs.oracle.com/javase/8/docs/api/";
        }
    }

    task sourcesJar(type: Jar) {
        archiveClassifier = 'sources';
        from sourceSets.main.allJava;
    }


    task javadocJar(type: Jar) {
        from javadoc;
        archiveClassifier = 'javadoc';
    }


    //   task generatePomFileForMavenCustomPublication {
    //       destination = file("$buildDir/poms/pom.xml");
    //   }

    //  build.dependsOn(generatePomFileForMavenCustomPublication);

    artifacts {
        archives jar;
        archives sourcesJar;
        archives javadocJar;
    }


    publishing {
        repositories
                {
                    maven {
                        if (project.version.endsWith('-SNAPSHOT')) {
                            //快照版本的nexus仓库地址
                            name 'snapshots';
                            url 'https://oss.sonatype.org/content/repositories/snapshots/';
                        } else {
                            name 'releases';
                            url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/';

                        }
                        credentials {
                            username = System.getenv("NEXUS_USERNAME");
                            password = System.getenv("NEXUS_PASSWORD");
                        }
                    }
                }

        publications {
            mavenJava(MavenPublication)
                    {
                        groupId project.group;
                        artifactId project.name;
                        version project.version;

                        //若是war包,就写components.web,若是jar包,就写components.java
                        from components.java;
                        artifact sourcesJar;
                        artifact javadocJar;
                        suppressAllPomMetadataWarnings();//屏蔽所有编译时的WARNING
                        pom {
                            name = project.name;
                            description = 'This is a game server framework.';
                            url = 'https://gamioo.io';
                            packaging = 'jar';

                            scm {
                                connection = 'scm:git@github.com:jiangguilong2000/gamioo.git';
                                developerConnection = 'scm:git@github.com:jiangguilong2000/gamioo.git';
                                url = 'https://github.com/jiangguilong2000/gamioo/';
                            }

                            licenses {
                                license {
                                    name = 'Apache-2.0 License';
                                    url = 'https://github.com/jiangguilong2000/gamioo/blob/master/LICENSE';
                                    distribution = 'repo';
                                }
                            }

                            developers {
                                developer {
                                    id = 'jgl2000';
                                    name = '阿龙';
                                    email = '41157121@qq.com';
                                    url = 'https://blog.gamioo.io';
                                }
                            }
                        }


                        //		       	pom.withXml {
                        //				            asNode().appendNode('description','A demonstration of maven POM customization');
                        //				  }

                    }


        }

    }
    ext."signing.keyId" = System.getenv('SIGNING_KEYID')
    ext."signing.password" = System.getenv('SIGNING_PASSWORD')
    ext."signing.secretKeyRingFile" = System.getenv('SIGNING_SECRETKEYRINGFILE')

    signing {
        //sign configurations.archives;
        sign publishing.publications.mavenJava;
    }


    dependencies {
        testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
        testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
        testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.4.0'
        testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.4.0'



        // 保证jmh目录下java代码能顺利import其他main目录下等代码
        jmhImplementation project
        jmhImplementation 'org.openjdk.jmh:jmh-core:1.36'
        jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.36'
        //  compileOnly group: 'org.apache.skywalking', name: 'apm-agent-core', version: '8.11.0'
        implementation group: 'org.jetbrains', name: 'annotations', version: '23.0.0'
    }

    jmh {

        // zip64 = false;
        jvmArgs = ['-Dfile.encoding=UTF-8'];
       humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt");

//
//        //  humanOutputFile.encoding = utf - 8;
//        // human-readable output file
       resultsFile = project.file("${project.buildDir}/reports/jmh/results.json") // results file
        resultFormat="JSON";

    }

    test {
        useJUnitPlatform()
        maxParallelForks(1)
        ignoreFailures(false)
        failFast(true)

        afterSuite { desc, result ->
            if (!desc.parent) {
                def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
                def startItem = '|  ', endItem = '  |'
                def repeatLength = startItem.length() + output.length() + endItem.length()
                println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
            }
        }
        reports.html.enabled = false
        reports.junitXml.enabled = false
    }

    task coverage(type: JacocoReport) {
        executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
        sourceSets sourceSets.main, sourceSets.jmh
    }

    coverage.dependsOn {
        project.test
    }

    jacocoTestReport {
        reports {
            xml.enabled true
            html.enabled false
        }
    }

    check.dependsOn jacocoTestReport


}


allprojects {


//    task printSigning {
//        println(project.findProperty('signing.secretKeyRingFile'))
//    }
//
//    task currentDir {
//        println file('.')
//    }
    repositories {
        //腾讯云的国内镜像
        maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public' }
    //  maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
    }

}





================================================
FILE: docs/_config.yml
================================================
theme: jekyll-theme-architect

================================================
FILE: docs/index.md
================================================
<p align="center">
  <img src="https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png" width="100">
</p>
## Welcome to GitHub Pages

You can use the [editor on GitHub](https://github.com/jiangguilong2000/gamioo/edit/master/docs/index.md) to maintain and preview the content for your website in Markdown files.

Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.

### Markdown

Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for

```markdown
Syntax highlighted code block

# Header 1

## Header 2

### Header 3

- Bulleted
- List

1. Numbered
2. List

**Bold** and _Italic_ and `Code` text

[Link](url) and ![Image](src)
```

For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/).

### Jekyll Themes

Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/jiangguilong2000/gamioo/settings). The name of this theme is
saved in the Jekyll `_config.yml` configuration file.

### Support or Contact

Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out.


================================================
FILE: gamioo-cache/README.md
================================================
<p align="center">
  <img src="https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png" width="100">
</p>
<p align="center">
	<strong>Cache, so easy.</strong>
</p>
<p align="center">
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml">
		<img src="https://github.com/jiangguilong2000/gamioo-navigation/actions/workflows/gradle.yml/badge.svg" ></img>
	</a>
	<a target="_blank" href="https://codecov.io/gh/jiangguilong2000/gamioo-navigation">
		<img src="https://codecov.io/gh/jiangguilong2000/gamioo-navigation/branch/main/graph/badge.svg?token=QBSoQmUNnn" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/releases">
		<img src="https://img.shields.io/github/release/jiangguilong2000/gamioo-navigation.svg" ></img>
	</a>
	<a target="_blank" href="https://github.com/jiangguilong2000/gamioo-navigation/commits">
		<img src="https://img.shields.io/github/last-commit/jiangguilong2000/gamioo-navigation.svg?style=flat-square" ></img>
	</a>
	<a target="_blank" href="https://gamioo.wiki" title="参考文档">
		<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
	</a>
	<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html" >
		<img src="https://img.shields.io/badge/JDK-1.8%2B-green.svg" ></img>
	</a>
	<a href="https://www.apache.org/licenses/LICENSE-2.0.html">
		<img src="https://img.shields.io/badge/license-Apache%202-4EB1BA.svg" />
	</a>
	<a target="_blank" href='https://github.com/jiangguilong2000/gamioo'>
		<img src="https://img.shields.io/github/stars/jiangguilong2000/gamioo.svg?style=social" alt="github star"></img>
	</a>
</p>
# 简介

📌 压缩相关

* 压缩算法
    * caffeine
    * guava

* 如何使用

```bash
implementation group: 'io.gamioo', name: 'gamioo-cache', version: '0.2.11'
```

#### 📄 性能测试结果如下:

```log
Benchmark                   (type)   Mode  Cnt         Score          Error  Units
CacheBenchMark.cache         guava  thrpt    5   8797574.523 ± 11079456.005  ops/s
CacheBenchMark.cache:get     guava  thrpt    5   7884606.600 ± 10841319.317  ops/s
CacheBenchMark.cache:put     guava  thrpt    5    912967.923 ±  1076468.236  ops/s
CacheBenchMark.cache      caffeine  thrpt    5  12313264.433 ± 24041374.853  ops/s
CacheBenchMark.cache:get  caffeine  thrpt    5   9645145.413 ± 17628648.683  ops/s
CacheBenchMark.cache:put  caffeine  thrpt    5   2668119.020 ±  7444828.382  ops/s
```

在Windows下(4核8线程 Intel Core i7),5根线程读操作,5根线程写操作,很明显,

- 存入API,caffeine 比 guava 性能达到了 292.2%;
- 获取API,caffeine 比 guava 性能达到了 122.3%;

### 依赖&参考

dependncy :
jdk:

```bash
OpenJDK Runtime Environment (Tencent Kona 8.0.12) (build 1.8.0_352-b1)
OpenJDK 64-Bit Server VM (Tencent Kona 8.0.12) (build 25.352-b1, mixed mode, sharing)
```

## TODO list



================================================
FILE: gamioo-cache/build.gradle
================================================
dependencies {
    api project(':gamioo-log');
    api group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '2.8.5'
    api group: 'com.google.guava', name: 'guava', version: '31.1-jre'
    api group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'

}

================================================
FILE: gamioo-cache/src/jmh/java/io/gamioo/cache/CacheBenchMark.java
================================================
package io.gamioo.cache;


import com.github.benmanes.caffeine.cache.Caffeine;
import com.google.common.cache.CacheBuilder;
import org.apache.commons.lang3.RandomUtils;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

import java.util.concurrent.TimeUnit;

/**
 * 缓存测试
 *
 * @author Allen Jiang
 */
@State(Scope.Group)
@BenchmarkMode({Mode.Throughput})
@OutputTimeUnit(TimeUnit.SECONDS)
@Warmup(iterations = 5, time = 1)
@Measurement(iterations = 5, time = 1)
@Fork(value = 1)
public class CacheBenchMark {
    @Param({"guava", "caffeine"})
    private String type;

    private com.google.common.cache.Cache<Integer, Integer> guavaCache;
    private com.github.benmanes.caffeine.cache.Cache<Integer, Integer> caffeineCache;

    private int key;


    @Setup(Level.Trial)
    public void init() {
        switch (type) {
            case "guava":
                this.guavaCache = CacheBuilder.newBuilder().build();
                break;
            case "caffeine":
                this.caffeineCache = Caffeine.newBuilder().build();
                break;
            default:
                throw new IllegalArgumentException("Illegal cache type.");
        }

    }

    @TearDown(Level.Trial)
    public void destroy() {
        this.guavaCache = null;
        this.caffeineCache = null;
    }

    @Group("cache")
    @GroupThreads()
    @Setup(Level.Invocation)
    public void prepare() {
        key = RandomUtils.nextInt(0, Integer.MAX_VALUE);
    }


    @Benchmark
    @Group("cache")
    @GroupThreads(5)
    public void put() {
        if (guavaCache != null) {
            guavaCache.put(key, key);
        }
        if (caffeineCache != null) {
            caffeineCache.put(key, key);
        }
    }

    @Benchmark
    @Group("cache")
    @GroupThreads(5)
    public Integer get() {
        if (guavaCache != null) {
            return guavaCache.getIfPresent(key);
        }
        if (caffeineCache != null) {
            return caffeineCache.getIfPresent(key);
        }
        return 0;
    }


    public static void main(String[] args) {
        Options opt = new OptionsBuilder()
                .include(CacheBenchMark.class.getSimpleName())
                .build();

        try {
            new Runner(opt).run();
        } catch (RunnerException e) {
            e.printStackTrace();
        }
    }
}


================================================
FILE: gamioo-common/build.gradle
================================================
dependencies {
    api project(':gamioo-log');
    api group: 'com.google.guava', name: 'guava', version: '31.1-jre';
    api group: 'com.esotericsoftware', name: 'reflectasm', version: '1.11.9';
    api group: 'org.apache.commons', name: 'commons-lang3', version: '3.11';
    api group: 'commons-io', name: 'commons-io', version: '2.8.0';
    api group: 'org.ow2.asm', name: 'asm', version: '8.0.1';
    api group: 'commons-net', name: 'commons-net', version: '3.9.0';
    api group: 'commons-codec', name: 'commons-codec', version: '1.15'
    api group: 'org.dom4j', name: 'dom4j', version: '2.1.3';
   api group: 'com.alibaba.fastjson2', name: 'fastjson2', version: '2.0.37';
    api group: 'org.apache.commons', name: 'commons-collections4', version: '4.4';
    api group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1';
    // api group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.14.2'
    //任务调度
    api group: 'it.sauronsoftware.cron4j', name: 'cron4j', version: '2.2.5';
    // api group: 'com.jfinal', name: 'jfinal', version: '5.0.8';
    api group: 'org.jctools', name: 'jctools-core', version: '3.3.0';
    // http
    api group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.14';
    api group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.14';

    api group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: '1.3.5';
    api group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '4.0.4';
    api group: 'org.reflections', name: 'reflections', version: '0.10.2';
    api group: 'cn.hutool', name: 'hutool-core', version: '5.8.18';

}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/concurrent/Group.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.concurrent;

/**
 * 执行线程组枚举类.
 * <p>
 * 线程调度规则:N个线程 处理M个队列,哪个线程空闲了就去处理有任务的队列
 * </p>
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public enum Group {
    /**
     * 以玩家ID划分的线程.
     * <p>
     * 可以理解为一个玩家一个线程<br>
     */
    ModuleThreadGroup,

    /**
     * 以模块划分的线程.
     * <p>
     * 可以理解为一个Controller一个线程<br>
     * 如:登录,世界聊天,公会,排行榜
     */
    NettyThreadGroup,

    /**
     * Netty本身的Work线程.
     * <p>
     * 心跳,或完全没有IO操作的逻辑,直接交给Netty的Work线程处理掉
     */
    PlayerThreadGroup,

    /**
     * 一种串行执行队列处理线程.只会有一根线程来处理,
     */
    QueueThreadGroup;
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/concurrent/NameableThreadFactory.java
================================================
package io.gamioo.common.concurrent;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 线程工厂,可以设置别名
 *
 * @author Allen Jiang[41157121@qq.com]
 * @since 1.0
 */
public class NameableThreadFactory implements ThreadFactory {
    private final String name;
    private final AtomicInteger threadCounter = new AtomicInteger(0);

    @Override
    public Thread newThread(Runnable runnable) {
        StringBuilder threadName = new StringBuilder(name);
        threadName.append("-").append(threadCounter.getAndIncrement());
        Thread thread = new Thread(group, runnable, threadName.toString());
        return thread;
    }

    final ThreadGroup group;

    public NameableThreadFactory(String name) {
        SecurityManager securitymanager = System.getSecurityManager();
        this.group = securitymanager == null ? Thread.currentThread().getThreadGroup() : securitymanager.getThreadGroup();
        this.name = name;
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/constant/CacheConstant.java
================================================
package io.gamioo.common.constant;

/**
 * @author Allen Jiang
 */
public class CacheConstant {
    public static final String RECORD = "record";


}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/constant/Describe.java
================================================
package io.gamioo.common.constant;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Describe {

    String name();

    //是否展示出来
    String description();
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/constant/ModuleConstant.java
================================================
package io.gamioo.common.constant;

import org.apache.commons.collections4.CollectionUtils;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Allen Jiang
 */
public class ModuleConstant {
    @Describe(name = "common", description = "通用模块")
    public static final int COMMON = 0;
    @Describe(name = "user", description = "用户模块")
    public static final int USER = 1;
    @Describe(name = "building", description = "建筑模块")
    public static final int BUILDING = 2;
    @Describe(name = "item", description = "道具模块")
    public static final int ITEM = 3;


    private static List<String> moduleList = new ArrayList<>();

    /**
     * 获取模块列表
     *
     * @return 返回模块列表
     */
    public static List<String> getModuleList() {
        if (CollectionUtils.isEmpty(moduleList)) {
            Field[] list = ModuleConstant.class.getDeclaredFields();
            for (Field e : list) {
                Describe describe = e.getAnnotation(Describe.class);
                if (describe != null) {
                    moduleList.add(describe.name());
                }
            }
        }
        return moduleList;

    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/constant/SystemConstant.java
================================================
package io.gamioo.common.constant;

/**
 * @author Allen Jiang
 */
public class SystemConstant {
    // 服务器类型
    /**
     * 游戏服务器
     */
    public final static String SERVER_TYPE_GAME = "game";
    /**
     * 全局服务器
     */
    public final static String SERVER_TYPE_GLOBAL = "global";

    /**
     * 日志服务器
     */
    public final static String SERVER_TYPE_LOGGER = "logger";
    /**
     * 充值服务器
     */
    public final static String SERVER_TYPE_CHARGE = "charge";
    /**
     * 网关服务器
     */
    public final static String SERVER_TYPE_GATE = "gate";
    /**
     * admin服务器
     */
    public final static String SERVER_TYPE_ADMIN = "admin";
    /**
     * 目录服务器
     */
    public final static String SERVER_TYPE_DIRECTORY = "directory";

    public static final String LOCALHOST = "127.0.0.1";

//    public static String getConfig(String gameType) {
//        return gameType + "_config";
//    }

    // 服务器状态
    /**
     * 服务器处于正常运行状态
     */
    public final static int SERVER_STATUS_OPENING = 0;
    /**
     * 服务器处于运维维护状态,只能允许GM进来
     */
    public final static int SERVER_STATUS_MAINTAIN = 1;
    /**
     * 服务器处于停服状态
     */
    public final static int SERVER_STATUS_STOPED = 2;

    // 系统
    /**
     * 系统ID
     */
    public final static int SYSTEM_ID = 0;
    /**
     * 系统名
     */
    public final static String SYSTEM_NAME = "系统";
    /**
     * 系统
     */
    public final static String NAME_SYS = "SYSTEM";

    // 游戏状态
    /**
     * 敬请期待
     */
    public final static int GAME_STATUS_PENDING = 0;
    /**
     * 正常对外
     */
    public final static int GAME_STATUS_OPENING = 1;
    /**
     * 正在维护
     */
    public final static int GAME_STATUS_MAINTAIN = 2;

    /**
     * 对20毫秒以下的处理值进行监控
     */
    public final static int THRESHOLD_DELAY = 20;

    /**
     * 服务器类型转化
     *
     * @param type 服务器类型
     * @return 返回服务器数字类型
     */
    public static int getServerType(String type) {
        switch (type) {
            case SERVER_TYPE_DIRECTORY: {
                return 1;

            }
            case SERVER_TYPE_GAME: {
                return 2;
            }
            default: {
                return 0;
            }
        }

    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/constant/TimeConstant.java
================================================
package io.gamioo.common.constant;

import java.util.Date;

public class TimeConstant {
    /**
     * 2020-01-01 00:00:00
     */
    public static final long LONG_AGO = 1577808000000l;

    /**
     * 2020-01-01 00:00:00
     */
    public static final Date DATE_LONG_AGO = new Date(LONG_AGO);
    /**
     * 一周毫秒时间
     */
    public static final int ONE_WEEK_MS = 7 * 24 * 60 * 60 * 1000;

    public static void main(String[] args) {
        //68719476735

        //System.out.println(2051193600000l-1577808000000l);

        //System.out.println(TimeUtil.parse("2035-01-01","yyyy-MM-dd").getTime());
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/BeansException.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.exception;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public abstract class BeansException extends ServiceException {



}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NestedIOException.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.exception;

import java.io.IOException;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class NestedIOException extends IOException {

    /**
     * Construct a {@code NestedIOException} with the specified detail message.
     *
     * @param msg the detail message
     */
    public NestedIOException(String msg) {
        super(msg);
    }

    /**
     * Construct a {@code NestedIOException} with the specified detail message
     * and nested exception.
     *
     * @param msg   the detail message
     * @param cause the nested exception
     */
    public NestedIOException(String msg, Throwable cause) {
        super(msg, cause);
    }


    /**
     * Return the detail message, including the message from the nested exception
     * if there is one.
     */
    @Override
    public String getMessage() {
        String message = super.getMessage();
        if (getCause() != null) {
            StringBuilder sb = new StringBuilder();
            if (message != null) {
                sb.append(message).append("; ");
            }
            sb.append("nested exception is ").append(getCause());
            return sb.toString();
        } else {
            return message;
        }
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicFieldException.java
================================================
package io.gamioo.common.exception;

/**
 * 在找不到指定Public属性时抛出.
 *
 * @author 小流氓[176543888@qq.com]
 * @since 3.3.6
 */
public class NoPublicFieldException extends ServiceException {


    public NoPublicFieldException(String message,Object... params) {
        super(message, params);
    }

    public NoPublicFieldException(String message, Throwable cause) {
        super(message, cause);
    }


    public NoPublicFieldException(Throwable cause, String message, Object... params) {
        super(cause, message, params);
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicMethodException.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */
package io.gamioo.common.exception;

/**
 * 在找不到指定Public方法时抛出.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class NoPublicMethodException extends RuntimeException {
    private static final long serialVersionUID = -4256184544259394170L;

    public NoPublicMethodException(String msg) {
        super(msg);
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/ServerBootstrapException.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.exception;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class ServerBootstrapException extends ServiceException{


    public ServerBootstrapException(String message,Object... params) {
        super(message, params);
    }

    public ServerBootstrapException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServerBootstrapException(Throwable cause, String message, Object... params) {
        super(cause, message, params);
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/exception/ServiceException.java
================================================
package io.gamioo.common.exception;

import io.gamioo.common.util.StringUtils;

/**
 * 框架异常类
 *
 * @author Allen Jiang
 * @since 1.0
 */
public class ServiceException extends RuntimeException {

	/**
     *
     */
	private static final long serialVersionUID = -3287463281746412649L;
	//private int errorCode;

	public ServiceException() {
		super();
	}
	public ServiceException(int code) {
		super(String.valueOf(code));
	}

	public ServiceException(Throwable cause,String message,Object... params){
		super(StringUtils.format(message, params),cause);
	}

	public ServiceException(String message) {
		super(message);
	}
	public ServiceException(String message,Object... params){
		super(StringUtils.format(message, params));
	}

	public ServiceException(String message, Throwable cause) {
		super(message, cause);
	}

	public ServiceException(Throwable cause) {
		super(cause);
	}
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/http/RequestMethod.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.http;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public enum RequestMethod {

    GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE

}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/lang/Cache.java
================================================
package io.gamioo.common.lang;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class Cache {
    private int type;
    private String ip;
    private int port;
    private int index;
    private String password;

    public Cache(){

    }
    public Cache(int type, String ip, int port, int index, String password) {
        this.type = type;
        this.ip = ip;
        this.port = port;
        this.index = index;
        this.password = password;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/lang/Server.java
================================================
package io.gamioo.common.lang;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

public class Server {
    private String name;
    private int id;
    private String type;
    private String args;// 启动参数
    private String innerIp;
    private String externalIp;
    private int innerPort;
    private int tcpPort;
    private int webPort;
    // private int followerId;
    private int status;
    // private String pid;
    private String serverVersion;
    private String dataVersion;
    private Date startTime;// 启动时间

    public Server() {

    }


    public String getType() {
        return type;
    }

    public String getArgs() {
        return args;
    }

    public void setArgs(String args) {
        this.args = args;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getServerVersion() {
        return serverVersion;
    }

    public void setServerVersion(String serverVersion) {
        if (serverVersion == null) {
            this.serverVersion = "";
        } else {
            this.serverVersion = serverVersion;
        }
    }

    public String getDataVersion() {
        return dataVersion;
    }

    public void setDataVersion(String dataVersion) {
        this.dataVersion = dataVersion;
    }


    public int getWebPort() {
        return webPort;
    }

    public void setWebPort(int webPort) {
        this.webPort = webPort;
    }

    public int getTcpPort() {
        return tcpPort;
    }

    public void setTcpPort(int tcpPort) {
        this.tcpPort = tcpPort;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getInnerPort() {
        return innerPort;
    }

    public void setInnerPort(int innerPort) {
        this.innerPort = innerPort;
    }

    public String getInnerIp() {
        return innerIp;
    }

    public void setInnerIp(String innerIp) {
        this.innerIp = innerIp;
    }

    public String getExternalIp() {
        return externalIp;
    }

    public void setExternalIp(String externalIp) {
        this.externalIp = externalIp;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }

}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/lang/ServerInfo.java
================================================
package io.gamioo.common.lang;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

public class ServerInfo {
    private int id;
    private String name;
    private int times;
    private Date addTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/shape/AABB.java
================================================
package io.gamioo.common.shape;

/**
 * @author Allen Jiang
 */
public class AABB implements Shape {
    private final int left;
    private final int top;
    private final int right;
    private final int bottom;


    public AABB(int left, int top, int right, int bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }


    public int getLeft() {
        return left;
    }

    public int getTop() {
        return top;
    }

    public int getRight() {
        return right;
    }

    public int getBottom() {
        return bottom;
    }

    public int getCenterX() {
        return (left + right + 1) / 2;
    }

    public int getCenterY() {
        return (top + bottom + 1) / 2;
    }

    public int getWidth() {
        return right - left + 1;
    }

    public int getHeight() {
        return bottom - top + 1;
    }


    @Override
    public String toString() {
        return "AABB{" +
                "left=" + left +
                ", top=" + top +
                ", right=" + right +
                ", bottom=" + bottom +
                '}';
    }

    @Override
    public boolean containsPoint(long x, long y) {
        return left <= x && x <= right && top <= y && y <= bottom;
    }

    @Override
    public AABB getAABB() {
        return this;
    }

    @Override
    public Point getRandomPoint() {
        return null;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Point.java
================================================
package io.gamioo.common.shape;


import io.gamioo.common.vector.Vector2f;

public class Point implements Shape {

    private final int x;
    private final int y;
    private AABB aabb;

    public static Point valueOf(int x, int y) {
        return new Point(x, y);
    }

    public static Point valueOf(float x, float y) {
        return new Point((int) x, (int) y);
    }

    private Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    /**
     * 获取两点的距离 单位 厘米
     * @param a 第一个点
     * @param b 第二个点
     * @return 距离
     */
    public static double calDisBetweenTwoPoint(Point a, Point b) {
        long xDis = a.x - b.x;
        long yDis = a.y - b.y;
        return Math.sqrt(xDis * xDis + yDis * yDis);
    }

    /**
     * 绕着point 旋转 radian弧度后得到的点
     * @param point 旋转中心点
     * @param radians 旋转角度
     * @return 旋转后的点
     */
    public Point rotate(Point point, double radians) {
        double sin = Math.sin(radians);
        double cos = Math.cos(radians);
        int x = (int) ((this.x - point.getX()) * cos - (this.y - point.getY()) * sin + point.getX());
        int y = (int) ((this.x - point.getX()) * sin + (this.y - point.getY()) * cos + point.getY());
        return Point.valueOf(x, y);
    }

    /**
     * 线性插值计算线段中的点
     * @param a 开始点
     * @param b 结束点
     * @param t 解
     *          @return 插值后的点
     *
     */
    public static Point lerpPoint(Point a, Point b, float t) {
        int ax = a.getX();
        int bx = b.getX();
        int ay = a.getY();
        int by = b.getY();
        return Point.valueOf((int) (ax + (bx - ax) * t), (int) (ay + (by - ay) * t));
    }

    /**
     * 获取a点到b点 距离b点 指定距离的点
     * @param a 开始点
     * @param b 结束点
     * @param dis 距离
     * @return 指定距离的点
     */
    public static Point getPointWithDisToEndPoint(Point a, Point b, int dis) {
        int ax = a.getX();
        int bx = b.getX();
        int ay = a.getY();
        int by = b.getY();
        double abDis = Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
        // 超出距离 则后退
//        if (abDis < dis) {
//            throw new ServiceException("a:{} b:{} dis:{}", a, b, dis);
//        }
        return lerpPoint(a, b, (float) ((abDis - dis) / abDis));
    }

    /**
     * 获取a点到b点 距离a点 指定距离的点
     * @param a 开始点
     * @param b 结束点
     * @param dis 距离
     * @return 指定距离的点
     */
    public static Point getPointWithDisToSrcPoint(Point a, Point b, float dis) {
        long ax = a.getX();
        long bx = b.getX();
        long ay = a.getY();
        long by = b.getY();
        float abDis = (float) Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
//        if (abDis < dis) {
//            throw new ServiceException("a:{} b:{} dis:{}", a, b, dis);
//        }
        return lerpPoint(a, b, dis / abDis);
    }

    /**
     * 通过起点、向量、距离获取终点
     * @param vector 向量
     * @param dis 距离
     * @return 终点
     */
    public Point getPointWithVectorAndDis(Vector2f vector, float dis) {
        Vector2f newVector = vector.resizeLength(dis);
        return Point.valueOf(x + (int) newVector.getX(), y + (int) newVector.getY());
    }

    /**

     * @param x 点x
     * @param y 点y

     * */
    @Override
    public boolean containsPoint(long x, long y) {
        return this.x == x && this.y == y;
    }

    @Override
    public AABB getAABB() {
        if (aabb == null) {
            aabb = new AABB(x, y, x, y);
        }
        return aabb;
    }

    @Override
    public Point getRandomPoint() {
        return Point.valueOf(x, y);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Point)) {
            return false;
        }
        Point point = (Point) obj;
        return this.x == point.x && this.y == point.y;
    }

    /**
     * 大体上相同 允许精度误差
     * @param point 要比较的点
     * @param accuracyErrorSize 精度误差
     * @return 相同返回true 不同返回false
     */
    public boolean roughlyEquals(Point point, final int accuracyErrorSize) {
        if (this == point) {
            return true;
        }
        return Math.abs(point.getX() - getX()) < accuracyErrorSize && Math.abs(point.getY() - getY()) < accuracyErrorSize;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Sector.java
================================================
package io.gamioo.common.shape;

import io.gamioo.common.util.MathUtils;
import io.gamioo.common.vector.Vector2f;
import org.apache.commons.lang3.RandomUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 扇形
 *
 * @author Allen Jiang
 */
public class Sector implements Shape {
    private Point center;
    private Point pointA;
    private Point pointB;
    private final int r;
    private final int startAngle;
    private final int endAngle;

    private AABB aabb = null;

    /**
     * 扇形构造函数
     *
     * @param one    原点
     * @param other  目标点
     * @param radius 半径
     * @param angle  扇形全角
     * @return know 形实例
     */
    public static Sector valueOf(Point one, Point other, int radius, int angle) {
        return new Sector(one, other, radius, angle);
    }

    private Sector(Point one, Point other, int radius, int angle) {
        this.center = Point.valueOf(one.getX(), one.getY());
        this.r = radius;
        Vector2f base = Vector2f.getVectorFromPointToPoint(one, other);
        Vector2f left = base.rotate(angle / 2).resizeLength(radius);
        this.pointA = Point.valueOf(left.getX() + this.center.getX(), left.getY() + this.center.getY());
        Vector2f right = left.rotate(-angle);
        this.pointB = Point.valueOf(right.getX() + this.center.getX(), right.getY() + this.center.getY());
        this.startAngle = (int) left.getAngle();
        this.endAngle = this.startAngle + angle;


    }

    @Override
    public boolean containsPoint(long x, long y) {
        return pointWithinRadius(x, y) && angleContainPoint(x, y);
    }

    /**
     * 忽略角度判断某点是否在扇形半径内
     * @param x 坐标x
     * @param y 坐标y
     * @return true 坐标在bigint形范围内 ; false  坐标在bigint形范围外
     */
    public boolean pointWithinRadius(long x, long y) {
        long distance = (x - this.center.getX()) * (x - this.center.getX()) + (y - this.center.getY()) * (y - this.center.getY());
        return distance <= (long) r * r;
    }

    public boolean containsPoint(Point point) {
        return this.containsPoint(point.getX(), point.getY());
    }


    @Override
    public AABB getAABB() {
        if (aabb == null) {
            List<Integer> listX = new ArrayList<>();
            List<Integer> listY = new ArrayList<>();
            Point center = this.center;
            listX.add(center.getX());
            listY.add(center.getY());

            Point pointA = this.pointA;
            listX.add(pointA.getX());
            listY.add(pointA.getY());

            Point pointB = this.pointB;
            listX.add(pointB.getX());
            listY.add(pointB.getY());

            Point pointC = Point.valueOf(this.center.getX() - r, this.center.getY());
            Point pointD = Point.valueOf(this.center.getX() + r, this.center.getY());

            Point pointE = Point.valueOf(this.center.getX(), this.center.getY() + r);
            Point pointF = Point.valueOf(this.center.getX(), this.center.getY() - r);


            if (this.containsPoint(pointC)) {
                listX.add(pointC.getX());
                listY.add(pointC.getY());
            }
            if (this.containsPoint(pointD)) {
                listX.add(pointD.getX());
                listY.add(pointD.getY());
            }
            if (this.containsPoint(pointE)) {
                listX.add(pointE.getX());
                listY.add(pointE.getY());
            }
            if (this.containsPoint(pointF)) {
                listX.add(pointF.getX());
                listY.add(pointF.getY());
            }

            int left = MathUtils.min(listX);
            int right = MathUtils.max(listX);
            int top = MathUtils.min(listY);
            int bottom = MathUtils.max(listY);
            aabb = new AABB(left, top, right, bottom);
        }
        return aabb;

    }

    @Override
    public Point getRandomPoint() {
        int length = RandomUtils.nextInt(1, r);
        int angle;
        if (this.startAngle < 0) {
            angle = (int) RandomUtils.nextDouble(this.startAngle + 1 + 360, this.endAngle + 360);
        } else {
            angle = (int) RandomUtils.nextDouble(this.startAngle + 1, this.endAngle);
        }
        Vector2f result = Vector2f.valueOf(length, angle);
        return Point.valueOf(result.getX() + this.center.getX(), result.getY() + this.center.getY());
    }

    public Point getCenter() {
        return center;
    }

    public void setCenter(Point center) {
        this.center = center;
    }

    public Point getPointA() {
        return pointA;
    }

    public void setPointA(Point pointA) {
        this.pointA = pointA;
    }

    public Point getPointB() {
        return pointB;
    }

    public void setPointB(Point pointB) {
        this.pointB = pointB;
    }

    public int getR() {
        return r;
    }

    public double getStartAngle() {
        return startAngle;
    }

    public double getEndAngle() {
        return endAngle;
    }

    /**
     * 判断点是否在扇形夹角中
     *
     * @param x x坐标
     * @param y y坐标
     * @return true表示在扇形夹角中
     */
    public boolean angleContainPoint(long x, long y) {
        double angle = Math.atan2(y - getCenter().getY(), x - getCenter().getX());
        angle = Math.toDegrees(angle);
        return angle >= startAngle && angle <= endAngle;
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Shape.java
================================================
package io.gamioo.common.shape;


public interface Shape {
    /**
     * 是否包含指定的点
     *
     * @param x 点x
     * @param y 点y
     *
     * @return true:包含
     */
    boolean containsPoint(long x, long y);

    /**
     * 获取aabb包围盒
     *
     * @return 包围盒
     */
    AABB getAABB();

    /**
     * 获取图形内随机一个点
     *
     * @return 点
     */
    Point getRandomPoint();
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/AnnotationUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */
package io.gamioo.common.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;


/**
 * 注解工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */

public class AnnotationUtils {
    private AnnotationUtils() {
    }

    /**
     * 获取指定类型的注解或注解上有指定的注解.
     *
     * @param element        注解元素
     * @param annotationType 注解类型
     * @param <A>            注解类型
     * @return 返回标识有指定注解的注解
     */
    public static <A extends Annotation> Annotation getAnnotation(AnnotatedElement element, Class<A> annotationType) {
        A annotation = element.getAnnotation(annotationType);
        if (annotation == null) {
            for (Annotation metaAnn : element.getAnnotations()) {
                annotation = metaAnn.annotationType().getAnnotation(annotationType);
                if (annotation != null) {
                    return metaAnn;
                }
            }
        }
        return annotation;
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/ArrayUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */
package io.gamioo.common.util;

import java.util.Arrays;

/**
 * 数组相关操作工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class ArrayUtils {
    /**
     * 一个空的字符串数组.
     */
    public static final String[] EMPTY_STRING_ARRAY = {};

    /**
     * <p>
     * Adds all the elements of the given arrays into a new array.
     * </p>
     * <p>
     * The new array contains all of the element of {@code array1} followed by
     * all of the elements {@code array2}. When an array is returned, it is
     * always a new array.
     * </p>
     *
     * <pre>
     * ArrayUtils.addAll([], [])         = []
     * </pre>
     *
     * @param array1 the first array whose elements are added to the new array.
     * @param array2 the second array whose elements are added to the new array.
     * @return The new long[] array.
     */
    public static long[] addAll(final long[] array1, final long... array2) {
        final long[] joinedArray = new long[array1.length + array2.length];
        System.arraycopy(array1, 0, joinedArray, 0, array1.length);
        System.arraycopy(array2, 0, joinedArray, array1.length, array2.length);
        return joinedArray;
    }

    /**
     * 判定Object数组是否为空(null或长度为0).
     *
     * @param array Object数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final Object[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定Object数组是否不为空(null或长度为0).
     *
     * @param array Object数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final Object[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定byte数组是否为空(null或长度为0).
     *
     * @param array byte数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final byte[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定byte数组是否不为空(null或长度为0).
     *
     * @param array byte数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final byte[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定boolean数组是否为空(null或长度为0).
     *
     * @param array boolean数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final boolean[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定boolean数组是否不为空(null或长度为0).
     *
     * @param array boolean数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final boolean[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定int数组是否为空(null或长度为0).
     *
     * @param array int数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final int[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定int数组是否不为空(null或长度为0).
     *
     * @param array int数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final int[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定long数组是否为空(null或长度为0).
     *
     * @param array long数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final long[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定long数组是否不为空(null或长度为0).
     *
     * @param array long数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final long[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定float数组是否为空(null或长度为0).
     *
     * @param array float数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final float[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定float数组是否不为空(null或长度为0).
     *
     * @param array float数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final float[] array) {
        return !isEmpty(array);
    }

    /**
     * 判定double数组是否为空(null或长度为0).
     *
     * @param array double数组
     * @return 如果为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isEmpty(final double[] array) {
        return array == null || array.length == 0;
    }

    /**
     * 判定double数组是否不为空(null或长度为0).
     *
     * @param array double数组
     * @return 如果不为空(null或长度为0)则返回true, 否则返回false.
     */
    public static boolean isNotEmpty(final double[] array) {
        return !isEmpty(array);
    }

    /**
     * String数组转化为int数组
     *
     * @param array String数组
     * @return int数组
     */
    public static int[] toIntArray(String[] array) {
        return Arrays.stream(array).mapToInt(s -> Integer.parseInt(s)).toArray();
    }

    /**
     * Integer数组转化为int数组
     *
     * @param array Integer数组
     * @return int数组
     */
    public static int[] toIntArray(Integer[] array) {
        return Arrays.stream(array).mapToInt(Integer::intValue).toArray();
    }

    /**
     * String数组转化为long数组
     *
     * @param array String数组
     * @return long数组
     */
    public static long[] toLongArray(String[] array) {
        return Arrays.stream(array).mapToLong(s -> Long.parseLong(s)).toArray();
    }

    /**
     * Long数组转化为long数组
     *
     * @param array Long数组
     * @return long数组
     */
    public static long[] toLongArray(Long[] array) {
        return Arrays.stream(array).mapToLong(Long::longValue).toArray();
    }

    /**
     * 字符串组数转化为字节数组.
     * <p>
     * 默认使用10进制解析
     *
     * @param array 字符串组数
     * @return 转化后的字节数组
     */
    public static byte[] toByteArray(String[] array) {
        return toByteArray(array, 10);
    }

    /**
     * 字符串组数转化为字节数组.
     *
     * @param array 字符串组数
     * @param radix 角色字符串数组{@code array}时所用的进制
     * @return 转化后的字节数组
     */
    public static byte[] toByteArray(String[] array, int radix) {
        final byte[] data = new byte[array.length];
        for (int i = 0; i < array.length; i++) {
            data[i] = (byte) Integer.parseInt(array[i], radix);
        }
        return data;
    }

    /**
     * 求数组长度.
     * <p>
     * 如果数组为null,则返回0
     *
     * @param array 字符串数组
     * @return 返回字符串数组长度
     */
    public static int length(String[] array) {
        return array == null ? 0 : array.length;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/Assert.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

import org.apache.commons.lang3.ObjectUtils;

import java.util.Collection;
import java.util.Map;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class Assert {


    /**
     * Assert a boolean expression, throwing {@code IllegalArgumentException}
     * if the test result is {@code false}.
     * <pre class="code">Assert.isTrue(i &gt; 0, "The value must be greater than zero");</pre>
     *
     * @param expression a boolean expression
     * @param message    the exception message to use if the assertion fails
     * @throws IllegalArgumentException if expression is {@code false}
     */
    public static void isTrue(boolean expression, String message) {
        if (!expression) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert a boolean expression, throwing {@code IllegalArgumentException}
     * if the test result is {@code false}.
     * <pre class="code">Assert.isTrue(i &gt; 0);</pre>
     *
     * @param expression a boolean expression
     * @throws IllegalArgumentException if expression is {@code false}
     */
    public static void isTrue(boolean expression) {
        isTrue(expression, "[Assertion failed] - this expression must be true");
    }

    /**
     * Assert that an object is {@code null} .
     * <pre class="code">Assert.isNull(value, "The value must be null");</pre>
     *
     * @param object  the object to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the object is not {@code null}
     */
    public static void isNull(Object object, String message) {
        if (object != null) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that an object is {@code null} .
     * <pre class="code">Assert.isNull(value);</pre>
     *
     * @param object the object to check
     * @throws IllegalArgumentException if the object is not {@code null}
     */
    public static void isNull(Object object) {
        isNull(object, "[Assertion failed] - the object argument must be null");
    }

    /**
     * Assert that an object is not {@code null} .
     * <pre class="code">Assert.notNull(clazz, "The class must not be null");</pre>
     *
     * @param object  the object to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the object is {@code null}
     */
    public static void notNull(Object object, String message) {
        if (object == null) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that an object is not {@code null} .
     * <pre class="code">Assert.notNull(clazz);</pre>
     *
     * @param object the object to check
     * @throws IllegalArgumentException if the object is {@code null}
     */
    public static void notNull(Object object) {
        notNull(object, "[Assertion failed] - this argument is required; it must not be null");
    }

    /**
     * Assert that the given String is not empty; that is,
     * it must not be {@code null} and not the empty String.
     * <pre class="code">Assert.hasLength(name, "Name must not be empty");</pre>
     *
     * @param text    the String to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the text is empty
     * @see StringUtils#hasLength
     */
    public static void hasLength(String text, String message) {
        if (!StringUtils.hasLength(text)) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that the given String is not empty; that is,
     * it must not be {@code null} and not the empty String.
     * <pre class="code">Assert.hasLength(name);</pre>
     *
     * @param text the String to check
     * @throws IllegalArgumentException if the text is empty
     * @see StringUtils#hasLength
     */
    public static void hasLength(String text) {
        hasLength(text,
                "[Assertion failed] - this String argument must have length; it must not be null or empty");
    }

    /**
     * Assert that the given String has valid text content; that is, it must not
     * be {@code null} and must contain at least one non-whitespace character.
     * <pre class="code">Assert.hasText(name, "'name' must not be empty");</pre>
     *
     * @param text    the String to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the text does not contain valid text content
     * @see StringUtils#hasText
     */
    public static void hasText(String text, String message) {
        if (!StringUtils.hasText(text)) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that the given String has valid text content; that is, it must not
     * be {@code null} and must contain at least one non-whitespace character.
     * <pre class="code">Assert.hasText(name, "'name' must not be empty");</pre>
     *
     * @param text the String to check
     * @throws IllegalArgumentException if the text does not contain valid text content
     * @see StringUtils#hasText
     */
    public static void hasText(String text) {
        hasText(text,
                "[Assertion failed] - this String argument must have text; it must not be null, empty, or blank");
    }

    /**
     * Assert that the given text does not contain the given substring.
     * <pre class="code">Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");</pre>
     *
     * @param textToSearch the text to search
     * @param substring    the substring to find within the text
     * @param message      the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the text contains the substring
     */
    public static void doesNotContain(String textToSearch, String substring, String message) {
        if (StringUtils.hasLength(textToSearch) && StringUtils.hasLength(substring) &&
                textToSearch.contains(substring)) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that the given text does not contain the given substring.
     * <pre class="code">Assert.doesNotContain(name, "rod");</pre>
     *
     * @param textToSearch the text to search
     * @param substring    the substring to find within the text
     * @throws IllegalArgumentException if the text contains the substring
     */
    public static void doesNotContain(String textToSearch, String substring) {
        doesNotContain(textToSearch, substring,
                "[Assertion failed] - this String argument must not contain the substring [" + substring + "]");
    }

    /**
     * Assert that an array has elements; that is, it must not be
     * {@code null} and must have at least one element.
     * <pre class="code">Assert.notEmpty(array, "The array must have elements");</pre>
     *
     * @param array   the array to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the object array is {@code null} or has no elements
     */
    public static void notEmpty(Object[] array, String message) {
        if (ObjectUtils.isEmpty(array)) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that an array has elements; that is, it must not be
     * {@code null} and must have at least one element.
     * <pre class="code">Assert.notEmpty(array);</pre>
     *
     * @param array the array to check
     * @throws IllegalArgumentException if the object array is {@code null} or has no elements
     */
    public static void notEmpty(Object[] array) {
        notEmpty(array, "[Assertion failed] - this array must not be empty: it must contain at least 1 element");
    }

    /**
     * Assert that an array has no null elements.
     * Note: Does not complain if the array is empty!
     * <pre class="code">Assert.noNullElements(array, "The array must have non-null elements");</pre>
     *
     * @param array   the array to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the object array contains a {@code null} element
     */
    public static void noNullElements(Object[] array, String message) {
        if (array != null) {
            for (Object element : array) {
                if (element == null) {
                    throw new IllegalArgumentException(message);
                }
            }
        }
    }

    /**
     * Assert that an array has no null elements.
     * Note: Does not complain if the array is empty!
     * <pre class="code">Assert.noNullElements(array);</pre>
     *
     * @param array the array to check
     * @throws IllegalArgumentException if the object array contains a {@code null} element
     */
    public static void noNullElements(Object[] array) {
        noNullElements(array, "[Assertion failed] - this array must not contain any null elements");
    }

    /**
     * Assert that a collection has elements; that is, it must not be
     * {@code null} and must have at least one element.
     * <pre class="code">Assert.notEmpty(collection, "Collection must have elements");</pre>
     *
     * @param collection the collection to check
     * @param message    the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the collection is {@code null} or has no elements
     */
    public static void notEmpty(Collection<?> collection, String message) {
        if (collection == null || collection.isEmpty()) {
            throw new IllegalArgumentException(message);
        }
    }

    /**
     * Assert that a collection has elements; that is, it must not be
     * {@code null} and must have at least one element.
     * <pre class="code">Assert.notEmpty(collection, "Collection must have elements");</pre>
     *
     * @param collection the collection to check
     * @throws IllegalArgumentException if the collection is {@code null} or has no elements
     */
    public static void notEmpty(Collection<?> collection) {
        notEmpty(collection,
                "[Assertion failed] - this collection must not be empty: it must contain at least 1 element");
    }

    /**
     * Assert that a Map has entries; that is, it must not be {@code null}
     * and must have at least one entry.
     * <pre class="code">Assert.notEmpty(map, "Map must have entries");</pre>
     *
     * @param map     the map to check
     * @param message the exception message to use if the assertion fails
     * @throws IllegalArgumentException if the map is {@code null} or has no entries
     */
    public static void notEmpty(Map<?, ?> map, String message) {
        if (map == null || map.isEmpty()) {
            throw new IllegalArgumentException(message);
        }

    }

    /**
     * Assert that a Map has entries; that is, it must not be {@code null}
     * and must have at least one entry.
     * <pre class="code">Assert.notEmpty(map);</pre>
     *
     * @param map the map to check
     * @throws IllegalArgumentException if the map is {@code null} or has no entries
     */
    public static void notEmpty(Map<?, ?> map) {
        notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
    }

    /**
     * Assert that the provided object is an instance of the provided class.
     * <pre class="code">Assert.instanceOf(Foo.class, foo);</pre>
     *
     * @param clazz the required class
     * @param obj   the object to check
     * @throws IllegalArgumentException if the object is not an instance of clazz
     * @see Class#isInstance
     */
    public static void isInstanceOf(Class<?> clazz, Object obj) {
        isInstanceOf(clazz, obj, "");
    }

    /**
     * Assert that the provided object is an instance of the provided class.
     * <pre class="code">Assert.instanceOf(Foo.class, foo);</pre>
     *
     * @param type    the type to check against
     * @param obj     the object to check
     * @param message a message which will be prepended to the message produced by
     *                the function itself, and which may be used to provide context. It should
     *                normally end in ":" or "." so that the generated message looks OK when
     *                appended to it.
     * @throws IllegalArgumentException if the object is not an instance of clazz
     * @see Class#isInstance
     */
    public static void isInstanceOf(Class<?> type, Object obj, String message) {
        notNull(type, "Type to check against must not be null");
        if (!type.isInstance(obj)) {
            throw new IllegalArgumentException(
                    (StringUtils.hasLength(message) ? message + " " : "") +
                            "Object of class [" + (obj != null ? obj.getClass().getName() : "null") +
                            "] must be an instance of " + type);
        }
    }

    /**
     * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
     * <pre class="code">Assert.isAssignable(Number.class, myClass);</pre>
     *
     * @param superType the super type to check
     * @param subType   the sub type to check
     * @throws IllegalArgumentException if the classes are not assignable
     */
    public static void isAssignable(Class<?> superType, Class<?> subType) {
        isAssignable(superType, subType, "");
    }

    /**
     * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
     * <pre class="code">Assert.isAssignable(Number.class, myClass);</pre>
     *
     * @param superType the super type to check against
     * @param subType   the sub type to check
     * @param message   a message which will be prepended to the message produced by
     *                  the function itself, and which may be used to provide context. It should
     *                  normally end in ":" or "." so that the generated message looks OK when
     *                  appended to it.
     * @throws IllegalArgumentException if the classes are not assignable
     */
    public static void isAssignable(Class<?> superType, Class<?> subType, String message) {
        notNull(superType, "Type to check against must not be null");
        if (subType == null || !superType.isAssignableFrom(subType)) {
            throw new IllegalArgumentException((StringUtils.hasLength(message) ? message + " " : "")
                    + subType + " is not assignable to " + superType);
        }
    }

    /**
     * Assert a boolean expression, throwing {@code IllegalStateException}
     * if the test result is {@code false}. Call isTrue if you wish to
     * throw IllegalArgumentException on an assertion failure.
     * <pre class="code">Assert.state(id == null, "The id property must not already be initialized");</pre>
     *
     * @param expression a boolean expression
     * @param message    the exception message to use if the assertion fails
     * @throws IllegalStateException if expression is {@code false}
     */
    public static void state(boolean expression, String message) {
        if (!expression) {
            throw new IllegalStateException(message);
        }
    }

    /**
     * Assert a boolean expression, throwing {@link IllegalStateException}
     * if the test result is {@code false}.
     * <p>Call {@link #isTrue(boolean)} if you wish to
     * throw {@link IllegalArgumentException} on an assertion failure.
     * <pre class="code">Assert.state(id == null);</pre>
     *
     * @param expression a boolean expression
     * @throws IllegalStateException if the supplied expression is {@code false}
     */
    public static void state(boolean expression) {
        state(expression, "[Assertion failed] - this state invariant must be true");
    }


}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/ByteArrayUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

/**
 * 字节数组操作工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class ByteArrayUtils {
    /**
     * 一个空的字节数组.
     */
    public static final byte[] EMPTY_BYTE_ARRAY = {};

    /**
     * 一个short类型的数字转化为2位byte数组
     *
     * @param a short类型的数字
     * @return byte数组
     */
    public static byte[] toByteArray(short a) {
        return new byte[]{(byte) ((a >> 8) & 0xFF), (byte) (a & 0xFF)};
    }

    /**
     * 一个int类型的数字转化为4位byte数组
     *
     * @param num int类型的数字
     * @return byte数组
     */
    public static byte[] toByteArray(int num) {
        return new byte[]{(byte) ((num >> 24) & 0xFF), (byte) ((num >> 16) & 0xFF), (byte) ((num >> 8) & 0xFF), (byte) (num & 0xFF)};
    }

    /**
     * 4位byte数组转化为一个int类型的数字
     *
     * @param bytes byte数组
     * @return int类型的数字
     */
    public static int toInt(byte[] bytes) {
        return bytes[3] & 0xFF | (bytes[2] & 0xFF) << 8 | (bytes[1] & 0xFF) << 16 | (bytes[0] & 0xFF) << 24;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/CharsetUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

import java.nio.charset.Charset;

/**
 * 字符集工具类
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class CharsetUtils {
    /**
     * ISO-8859-1
     */
    public static final String ISO_8859_1 = "ISO-8859-1";
    /**
     * UTF-8
     */
    public static final String UTF_8 = "UTF-8";
    /**
     * GBK
     */
    public static final String GBK = "GBK";
    /**
     * ISO-8859-1
     */
    public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
    /**
     * UTF-8
     */
    public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
    /**
     * GBK
     */
    public static final Charset CHARSET_GBK = Charset.forName(GBK);
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/ClassUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class ClassUtils {
    /**
     * Return the default ClassLoader to use: typically the thread context
     * ClassLoader, if available; the ClassLoader that loaded the ClassUtils
     * class will be used as fallback.
     * <p>Call this method if you intend to use the thread context ClassLoader
     * in a scenario where you clearly prefer a non-null ClassLoader reference:
     * for example, for class path resource loading (but not necessarily for
     * {@code Class.forName}, which accepts a {@code null} ClassLoader
     * reference as well).
     * @return the default ClassLoader (only {@code null} if even the system
     * ClassLoader isn't accessible)
     * @see Thread#getContextClassLoader()
     * @see ClassLoader#getSystemClassLoader()
     */
    public static ClassLoader getDefaultClassLoader() {
        ClassLoader ret = null;
        try {
            ret = Thread.currentThread().getContextClassLoader();
        }
        catch (Throwable ex) {
            // Cannot access thread context ClassLoader - falling back...
        }
        if (ret == null) {
            // No thread context class loader -> use class loader of this class.
            ret = ClassUtils.class.getClassLoader();
            if (ret == null) {
                // getClassLoader() returning null indicates the bootstrap ClassLoader
                try {
                    ret = ClassLoader.getSystemClassLoader();
                }
                catch (Throwable ex) {
                    // Cannot access system ClassLoader - oh well, maybe the caller can live with null...
                }
            }
        }
        return ret;
    }
    /**
     * 使用当前线程的ClassLoader加载给定的类
     *
     * @param className 类的全称
     * @return 给定的类
     */
    public static Class<?> loadClass(String className) {
        // ClassLoader#loadClass(String):将.class文件加载到JVM中,不会执行static块,只有在创建实例时才会去执行static块
        try {
            return Thread.currentThread().getContextClassLoader().loadClass(className);
        } catch (ClassNotFoundException e) {
        }

        // Class#forName(String):将.class文件加载到JVM中,还会对类进行解释,并执行类中的static块
        try {
            return Class.forName(className);
        } catch (ClassNotFoundException e) {
        }

        throw new RuntimeException("无法加载指定类名的Class=" + className);
    }

    /**
     * 创建一个指定类的对象,调用默认的构造函数.
     *
     * @param <T>   Class
     * @param klass 类
     * @return 指定类的对象
     */
    public static <T> T newInstance(final Class<T> klass) {
        try {
            return klass.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            throw new RuntimeException("无法创建实例. Class=" + klass.getName(), e);
        }
    }

    /**
     * 根据ClassName和构造方法的参数列表来创建一个对象
     *
     * @param <T>        Class
     * @param className  指定类全名(包含包名称的那种)
     * @param parameters 参数列表
     * @return 指定ClassName的对象
     */
    @SuppressWarnings("unchecked")
    public static <T> T newInstance(String className, Object... parameters) {
        Class<?> klass = (Class<?>) loadClass(className);
        try {
            Class<?>[] parameterTypes = new Class<?>[parameters.length];
            for (int i = 0, len = parameters.length; i < len; i++) {
                parameterTypes[i] = parameters[i].getClass();
            }
            return (T) klass.getConstructor(parameterTypes).newInstance(parameters);
        } catch (Exception e) {
            throw new RuntimeException("无法创建实例. Class=" + klass.getName(), e);
        }
    }

//    /**
//     * 尝试运行一个带有Main方法的类.
//     *
//     * @param mainClass 带有Main方法类的名称
//     * @param args      启动参数数组
//     */
//    public static void invokeMain(String mainClass, String[] args) {
//        final Class<?> klass = ClassUtils.loadClass(mainClass);
//        Method mainMethod = MethodUtils.getMethod(klass, "main", String[].class);
//        MethodUtils.invoke(null, mainMethod, new Object[]{args});
//    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/FieldUtils.java
================================================
package io.gamioo.common.util;

import io.gamioo.common.exception.NoPublicFieldException;
import io.gamioo.common.exception.ServerBootstrapException;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.*;

/**
 * 属性工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class FieldUtils {

    private static final int PREFIX_IS_METHOD_INDEX = 2;
    private static final int PREFIX_GET_METHOD_INDEX = 3;
    private static final int PREFIX_SET_METHOD_INDEX = 3;

    /**
     * 强制给一个属性{@link Field}写入值.
     *
     * @param target 目标对象
     * @param field  要写入的属性
     * @param value  要写入的值
     */
    public static void writeField(final Object target, final Field field, final Object value) {
        if (!field.isAccessible()) {
            field.setAccessible(true);
        }
        try {
            field.set(target, value);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            throw new ServerBootstrapException(target.getClass() + " 的 " + field.getName() + " 属性无法注入.", e);
        }
    }

    /**
     * 强制给一个指定名称的属性写入值.
     * <p>
     * 这个基本是留言给脚本调用的,方便修改一些配置错误而生的方法(自动找父类的属性)
     *
     * @param target    目标对象
     * @param fieldName 要写入的属性名称
     * @param value     要写入的值
     */
    public static void writeField(final Object target, final String fieldName, final Object value) {
        Field field = FieldUtils.getField(target.getClass(), fieldName);
        if (field == null) {
            throw new NoPublicFieldException("Class={},field={} not found",target.getClass().getName(),fieldName);
        }
        FieldUtils.writeField(target, field, value);
    }

    /**
     * 强制读取一个属性{@link Field}的值.
     *
     * @param target 目标类对象,如果是静态方法,目标为null
     * @param field  对象的属性
     * @return 返回对象属性的值
     */
    public static Object readField(final Object target, final Field field) {
        if (!field.isAccessible()) {
            field.setAccessible(true);
        }
        try {
            return field.get(target);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            throw new ServerBootstrapException(e,"{} 的 {} 属性无法读取.",target.getClass(), field.getName());

        }
    }

    /**
     * 获取指定名称的属性.
     *
     * @param klass     指定类
     * @param fieldName 指定名称
     * @return 指定名称的属性
     */
    public static Field getField(final Class<?> klass, String fieldName) {
        for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) {
            for (Field field : target.getDeclaredFields()) {
                if (field.getName().equals(fieldName)) {
                    return field;
                }
            }
        }
        return null;
    }

    /**
     * 获取指定类的所有属性,包含父类的属性.
     * <p>
     * 包含私有属性,包含静态属性等等....
     *
     * @param klass 指定类
     * @return 指定类的属性集合.
     */
    public static List<Field> getFieldList(final Class<?> klass) {
        List<Field> result = new ArrayList<>();
        for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) {
            result.addAll(Arrays.asList(target.getDeclaredFields()));
        }
        return result;
    }

    /**
     * 生成Get方法名.
     * <p>
     *
     * @param field 属性
     * @return Get方法名
     */
    public static String genGetMethodName(Field field) {
        int len = field.getName().length();
        StringBuilder sb;
        if (field.getType() == boolean.class) {
            sb = new StringBuilder(len + 2);
            sb.append("is").append(field.getName());
            if (Character.isLowerCase(sb.charAt(PREFIX_IS_METHOD_INDEX))) {
                sb.setCharAt(PREFIX_IS_METHOD_INDEX, Character.toUpperCase(sb.charAt(PREFIX_IS_METHOD_INDEX)));
            }
        } else {
            sb = new StringBuilder(len + 3);
            sb.append("get").append(field.getName());
            if (Character.isLowerCase(sb.charAt(PREFIX_GET_METHOD_INDEX))) {
                sb.setCharAt(PREFIX_GET_METHOD_INDEX, Character.toUpperCase(sb.charAt(PREFIX_GET_METHOD_INDEX)));
            }
        }
        return sb.toString();
    }

    /**
     * 生成Set方法名.
     *
     * @param field 属性
     * @return Set方法名
     */
    public static String genSetMethodName(Field field) {
        int len = field.getName().length();
        StringBuilder sb = new StringBuilder(len + 3);
        sb.append("set").append(field.getName());
        if (Character.isLowerCase(sb.charAt(PREFIX_SET_METHOD_INDEX))) {
            sb.setCharAt(PREFIX_SET_METHOD_INDEX, Character.toUpperCase(sb.charAt(PREFIX_SET_METHOD_INDEX)));
        }
        return sb.toString();
    }

    /**
     * 利用反射,扫描出此类所有属性(包含父类中子类没有重写的属性)
     *
     * @param klass       指定类.
     * @param annotations 标识属性的注解
     * @return 返回此类所有属性.
     */
    public static Field[] scanAllField(final Class<?> klass, List<Class<? extends Annotation>> annotations) {
        // 为了返回是有序的添加过程,这里使用LinkedHashMap
        Map<String, Field> fieldMap = new LinkedHashMap<>();
        scanField(klass, fieldMap, annotations);
        return fieldMap.values().toArray(new Field[0]);
    }

    /**
     * 递归的方式拉取属性,这样父类的属性就在上面了...
     *
     * @param klass       类
     * @param fieldMap    所有属性集合
     * @param annotations 标识属性的注解
     */
    private static void scanField(final Class<?> klass, Map<String, Field> fieldMap, List<Class<? extends Annotation>> annotations) {
        Class<?> superClass = klass.getSuperclass();
        if (!Object.class.equals(superClass)) {
            scanField(superClass, fieldMap, annotations);
        }
        // 属性判定
        for (Field f : klass.getDeclaredFields()) {
            // Static和Final的不要
            if (Modifier.isStatic(f.getModifiers()) || Modifier.isFinal(f.getModifiers())) {
                continue;
            }
            // 子类已重写或内部类中的不要
            if (fieldMap.containsKey(f.getName()) || f.getName().startsWith("this$")) {
                continue;
            }
            // 没有指定的注解不要
            for (Annotation a : f.getAnnotations()) {
                if (annotations.contains(a.annotationType())) {
                    fieldMap.put(f.getName(), f);
                    break;
                }
            }
        }
    }


    /**
     * 获取Map类型的属性Key的Class对象.
     *
     * @param field Map类型的属性
     * @return Key的Class对象
     */
    public static Class<?> getMapFieldKeyClass(Field field) {
        Type genericType = field.getGenericType();
        if (genericType instanceof ParameterizedType) {
            ParameterizedType pt = (ParameterizedType) genericType;
            // Key是第0位
            return (Class<?>) pt.getActualTypeArguments()[0];
        }
        return Object.class;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/FileUtils.java
================================================
package io.gamioo.common.util;

import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.*;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import java.util.List;
import java.util.Optional;

/**
 * 文件操作工具类.
 *
 * @author Allen Jiang
 */
public class FileUtils {
    private static final Logger logger = LogManager.getLogger(FileUtils.class);
    private static final String URL_PROTOCOL_JAR = "jar";
    /**
     * 可读大小的单位
     */
    private static final String[] UNITS = new String[]{"B", "KB", "MB", "GB", "TB", "EB"};

    /**
     * 加载类路径下指定名称文件中的文本.
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     */
    public static Optional<String> getFileText(String fileName) {
        try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName)) {
            return Optional.ofNullable(StringUtils.readString(is));
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
        // 文件不存在等其他情况返回null
        return Optional.empty();
    }


    /**
     * 读取指定名称文件中的文本.
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     * @throws IOException           If an I/O error occurs
     * @throws FileNotFoundException 文件未找到会抛出此异常
     */
    public static String readFileText(String fileName) throws FileNotFoundException, IOException {
        try (FileReader reader = new FileReader(fileName)) {
            return StringUtils.readString(reader);
        }
    }

    /**
     * 读取指定名称文件中的文本.
     * TODO(fix): 当fileName不存在的情况下,会导致空指针异常。
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     */
    public static File getFile(String fileName) {
        // 通过url获取File的绝对路径
        URL url = Thread.currentThread().getContextClassLoader().getResource(fileName);
        if (url != null) {
            return new File(url.getFile());
        } else {
            return null;
        }


    }

    /**
     * 读取指定名称文件中的文本.
     * 获取jar包内的资源
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     */
    public static File getFileFromJar(String fileName) {
        // 通过url获取File的绝对路径
        URL url = FileUtils.class.getResource(fileName);
        if (url != null) {
            return new File(url.getFile());
        } else {
            return null;
        }
    }


    /**
     * 读取指定名称文件中的文本.
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     */
    public static InputStream getInputStream(String fileName) {
        return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
    }


    public static InputStream getInputStreamFromAll(String fileName) throws IOException {
        InputStream ret;
        URL url = ClassUtils.getDefaultClassLoader().getResource(fileName);
     
        File file = null;
        if (url != null && StringUtils.equals(url.getProtocol(), URL_PROTOCOL_JAR)) {
            ret = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
        } else {

            file = new File(url.getFile());
            ret = openInputStream(file);
        }
        return ret;
    }

    /**
     * 写入指定文本到文件中.
     * <p>
     * 文件不存在,则会自动创建,默认是覆盖原文件
     *
     * @param fileName 文件名称
     * @param content  要写入的内容
     * @throws IOException If an I/O error occurs
     */
    public static void writeFileText(String fileName, String content) throws IOException {
        writeFileText(fileName, false, content);
    }

    /**
     * 写入指定文本到文件中.
     * <p>
     * 文件不存在,则会自动创建
     *
     * @param fileName 文件名称
     * @param append   是否追加写入
     * @param content  要写入的内容
     * @throws IOException If an I/O error occurs
     */
    public static void writeFileText(String fileName, boolean append, String content) throws IOException {
        try (FileOutputStream fos = new FileOutputStream(fileName, append); OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8)) {
            osw.write(content);
            osw.flush();
        }
    }

    /**
     * 可读的文件大小
     *
     * @param file 文件
     * @return 大小
     */
    public static String readableFileSize(File file) {
        return readableFileSize(file.length());
    }

    /**
     * 可读的文件大小<br>
     *
     * @param size Long类型大小
     * @return 大小
     */
    public static String readableFileSize(long size) {
        if (size <= 0) {
            return "0";
        }
        int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
        return new DecimalFormat("#,##0.##").format(size / Math.pow(1024, digitGroups)) + " " + UNITS[digitGroups];
    }

    /**
     * 创建指定文件,目录不存在则自动创建
     * <p>
     * 如果目标文件不存在并且创建成功,则为true;如果目标文件存在,则为false
     *
     * @param file 文件对象
     * @return 如果目标文件不存在并且创建成功,则为true;如果目标文件存在,则为false
     * @throws IOException IO异常
     */
    public static boolean createNewFile(File file) throws IOException {
        // 目标文件存在,直接返回false.
        if (file.exists()) {
            return false;
        }

        // 如果目录不存在则创建此父目录
        final File parentDir = file.getParentFile();
        if (parentDir != null && !parentDir.exists()) {
            parentDir.mkdirs();
        }

        // 目录有了,直接调用JDK的创建新文件命令
        return file.createNewFile();
    }

    public static List<String> readLines(final File file) throws IOException {
        return readLines(file, Charset.defaultCharset());
    }

    /**
     * Reads the contents of a file line by line to a List of Strings.
     * The file is always closed.
     *
     * @param file    the file to read, must not be {@code null}
     * @param charset the charset to use, {@code null} means platform default
     * @return the list of Strings representing each line in the file, never {@code null}
     * @throws IOException in case of an I/O error
     * @since 2.3
     */
    public static List<String> readLines(final File file, final Charset charset) throws IOException {
        try (InputStream in = openInputStream(file)) {
            return IOUtils.readLines(in, Charsets.toCharset(charset));
        }
    }

    /**
     * Opens a {@link FileInputStream} for the specified file, providing better
     * error messages than simply calling <code>new FileInputStream(file)</code>.
     * <p>
     * At the end of the method either the stream will be successfully opened,
     * or an exception will have been thrown.
     * </p>
     * <p>
     * An exception is thrown if the file does not exist.
     * An exception is thrown if the file object exists but is a directory.
     * An exception is thrown if the file exists but cannot be read.
     * </p>
     *
     * @param file the file to open for input, must not be {@code null}
     * @return a new {@link FileInputStream} for the specified file
     * @throws FileNotFoundException if the file does not exist
     * @throws IOException           if the file object is a directory
     * @throws IOException           if the file cannot be read
     * @since 1.3
     */
    public static FileInputStream openInputStream(final File file) throws IOException {
        if (file.exists()) {
            if (file.isDirectory()) {
                throw new IOException("File '" + file + "' exists but is a directory");
            }
            if (!file.canRead()) {
                throw new IOException("File '" + file + "' cannot be read");
            }
        } else {
            throw new FileNotFoundException("File '" + file + "' does not exist");
        }
        return new FileInputStream(file);
    }

    /**
     * Reads the contents of a file into a String using the default encoding for the VM.
     * The file is always closed.
     *
     * @param file the file to read, must not be {@code null}
     * @return the file contents, never {@code null}
     * @throws IOException in case of an I/O error
     * @since 1.3.1
     */
    public static String readFileToString(final File file) throws IOException {
        return readFileToString(file, Charset.defaultCharset());
    }

    /**
     * Reads the contents of a file into a String.
     * The file is always closed.
     *
     * @param file        the file to read, must not be {@code null}
     * @param charsetName the name of the requested charset, {@code null} means platform default
     * @return the file contents, never {@code null}
     * @throws IOException in case of an I/O error
     * @since 2.3
     */
    public static String readFileToString(final File file, final Charset charsetName) throws IOException {
        try (InputStream in = openInputStream(file)) {

            return IOUtils.toString(in, Charsets.toCharset(charsetName));
        }
    }


    /**
     * Reads the contents of a file into a String.
     * The file is always closed.
     *
     * @param file the file to read, must not be {@code null}
     * @return the file contents, never {@code null}
     * @throws IOException in case of an I/O error
     * @since 2.3
     */
    public static byte[] readFileToByteArray(final File file) throws IOException {
        try (InputStream in = openInputStream(file)) {
            return IOUtils.toByteArray(in);
        }
    }

    /**
     * Reads the contents of a file into a String. The file is always closed.
     *
     * @param file        the file to read, must not be {@code null}
     * @param charsetName the name of the requested charset, {@code null} means platform default
     * @return the file contents, never {@code null}
     * @throws IOException                                  in case of an I/O error
     * @throws java.nio.charset.UnsupportedCharsetException thrown instead of {@link java.io
     *                                                      .UnsupportedEncodingException} in version 2.2 if the encoding is not supported.
     * @since 2.3
     */
    public static String readFileToString(final File file, final String charsetName) throws IOException {
        return readFileToString(file, Charsets.toCharset(charsetName));
    }

    /**
     * 读取指定名称文件中的文本.
     * 获取jar包内的资源
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     * @throws IOException 文件不存在
     */
    public static String getStringFromJar(String fileName) throws IOException {
        // 通过url获取File的绝对路径
        InputStream input = FileUtils.class.getResourceAsStream(fileName);
        if (input != null) {
            return StringUtils.readString(input);
        } else {
            throw new IOException(fileName + " not exist");
        }
    }

    /**
     * 读取指定名称文件中的文本.
     * 获取jar包内的资源
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     * @throws IOException 文件不存在
     */
    public static byte[] getByteArrayFromJar(String fileName) throws IOException {
        // 通过url获取File的绝对路径
        //  InputStream input = FileUtils.class.getResourceAsStream(fileName);
        InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
        if (input != null) {
            return IOUtils.toByteArray(input);
        } else {
            throw new IOException(fileName + " not exist");
        }


    }


    /**
     * 加载类路径下指定名称文件中的文本. 包括jar 里的还是在jar外的resource
     *
     * @param fileName 文件名称
     * @return 返回文件中的文本
     * @throws IOException 文件不存在
     */
    public static byte[] getByteArrayFromFile(String fileName) throws IOException {
        byte[] ret;
        URL url = ClassUtils.getDefaultClassLoader().getResource(fileName);
        File file = null;
        if (url != null && StringUtils.equals(url.getProtocol(), URL_PROTOCOL_JAR)) {
            // file = new File(url.getFile());
            ret = getByteArrayFromJar(fileName);
        } else {
            file = getFile(fileName);
            ret = FileUtils.readFileToByteArray(file);

        }


        return ret;

    }


}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/JSONUtils.java
================================================
package io.gamioo.common.util;

import com.alibaba.fastjson2.JSONObject;
import io.gamioo.common.exception.ServiceException;
import org.dom4j.Document;
import org.dom4j.Element;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class JSONUtils {

    public static JSONObject loadFromXMLFile(String fileName) throws ServiceException {
        JSONObject ret = new JSONObject();
        Document document = XMLUtil.loadFromFile(fileName);
        Element root = document.getRootElement();
        JsonXmlUtil.xml2Json(root, ret);
        return ret;
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/JVMUtil.java
================================================
package io.gamioo.common.util;

import java.lang.management.ManagementFactory;
import java.util.List;

/**
 * @author Allen Jiang
 */
public class JVMUtil {

	public static String getStartArgs() {
		String ret = "";
		List<String> list = ManagementFactory.getRuntimeMXBean().getInputArguments();
		for (String e : list) {
			ret += e + " ";
		}
		return ret;
	}
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/JsonXmlUtil.java
================================================
package io.gamioo.common.util;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dom4j.Attribute;
import org.dom4j.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * xml 和 json的转换器
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class JsonXmlUtil {
    private static final Logger logger = LogManager.getLogger(JsonXmlUtil.class);
    private static DocumentBuilderFactory documentBuilderFactory;

    static {
        documentBuilderFactory = DocumentBuilderFactory.newInstance();
        //XML外部实体注入漏洞 https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=23_5
        try {
            // This is the PRIMARY defense. If DTDs (doctypes) are disallowed, almost all
            // XML entity attacks are prevented
            // Xerces 2 only -
            // http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl
            String FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
            documentBuilderFactory.setFeature(FEATURE, true);

            // If you can't completely disable DTDs, then at least do the following:
            // Xerces 1 -
            // http://xerces.apache.org/xerces-j/features.html#external-general-entities
            // Xerces 2 -
            // http://xerces.apache.org/xerces2-j/features.html#external-general-entities
            // JDK7+ - http://xml.org/sax/features/external-general-entities
            FEATURE = "http://xml.org/sax/features/external-general-entities";
            documentBuilderFactory.setFeature(FEATURE, false);

            // Xerces 1 -
            // http://xerces.apache.org/xerces-j/features.html#external-parameter-entities
            // Xerces 2 -
            // http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities
            // JDK7+ - http://xml.org/sax/features/external-parameter-entities
            FEATURE = "http://xml.org/sax/features/external-parameter-entities";
            documentBuilderFactory.setFeature(FEATURE, false);

            // Disable external DTDs as well
            FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
            documentBuilderFactory.setFeature(FEATURE, false);

            // and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and
            // Entity Attacks"
            documentBuilderFactory.setXIncludeAware(false);
            documentBuilderFactory.setExpandEntityReferences(false);

            // And, per Timothy Morgan: "If for some reason support for inline DOCTYPEs are
            // a requirement, then
            // ensure the entity settings are disabled (as shown above) and beware that SSRF
            // attacks
            // (http://cwe.mitre.org/data/definitions/918.html) and denial
            // of service attacks (such as billion laughs or decompression bombs via "jar:")
            // are a risk."
            // remaining parser logic
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }

    /**
     * xml转json
     *
     * @param element 元素
     * @param json    json
     */
    public static void xml2Json(Element element, JSONObject json) {
        //如果是属性


        for (Attribute e : element.attributes()) {
            json.put(e.getName(), e.getValue());

        }
        List<Element> list = element.elements();

        for (Element e : list) {
            JSONObject object = new JSONObject();
            xml2Json(e, object);
            Object obj = json.get(e.getName());
            if (obj == null) {
                json.put(e.getName(), object);
            } else {
                JSONArray array = null;
                if (obj instanceof JSONObject) {
                    JSONObject jsonObject = (JSONObject) obj;
                    json.remove(e.getName());
                    array = new JSONArray();
                    array.add(jsonObject);
                    array.add(object);

                } else if (obj instanceof JSONArray) {
                    array = (JSONArray) obj;
                    array.add(object);
                }
                json.put(e.getName(), array);
            }
        }


    }

    public static boolean isEmpty(String str) {

        if (str == null || str.trim().isEmpty() || "null".equals(str)) {
            return true;
        }
        return false;
    }


    /**
     * 将Map转换为XML格式的字符串
     *
     * @param store Map类型数据
     * @return XML格式的字符串
     */
    public static String mapToXml(Map<String, Object> store) {
        try {

            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            org.w3c.dom.Document document = documentBuilder.newDocument();
            org.w3c.dom.Element root = document.createElement("xml");
            document.appendChild(root);
            for (String key : store.keySet()) {
                Object obj = store.get(key);
                String value = "";
                if (obj != null) {
                    value = String.valueOf(obj).trim();
                }
                org.w3c.dom.Element filed = document.createElement(key);
                filed.appendChild(document.createTextNode(value));
                root.appendChild(filed);
            }
            TransformerFactory tf = TransformerFactory.newInstance();
            Transformer transformer = tf.newTransformer();
            DOMSource source = new DOMSource(document);
            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            StringWriter writer = new StringWriter();
            StreamResult result = new StreamResult(writer);
            transformer.transform(source, result);
            String output = writer.getBuffer().toString(); // .replaceAll("\n|\r",
            writer.close();
            return output;
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
        return null;
    }

    /**
     * XML格式字符串转换为Map
     *
     * @param strXML XML字符串
     * @return XML数据转换后的Map
     */
    public static Map<String, String> xmlToMap(String strXML) {
        try {
            Map<String, String> data = new HashMap<>();
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            InputStream stream = new ByteArrayInputStream(strXML.getBytes("UTF-8"));
            org.w3c.dom.Document doc = documentBuilder.parse(stream);
            doc.getDocumentElement().normalize();
            NodeList nodeList = doc.getDocumentElement().getChildNodes();
            for (int idx = 0; idx < nodeList.getLength(); ++idx) {
                Node node = nodeList.item(idx);
                if (node.getNodeType() == Node.ELEMENT_NODE) {
                    org.w3c.dom.Element element = (org.w3c.dom.Element) node;
                    data.put(element.getNodeName(), element.getTextContent());
                }
            }
            stream.close();
            return data;
        } catch (Exception ex) {
            logger.error(ex.getMessage(), ex);
        }
        return null;
    }
}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/MathUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */
package io.gamioo.common.util;

import io.gamioo.common.shape.Point;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 数学计算相关的工具类库.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class MathUtils {
    /**
     * 一
     */
    public static final double ONE = 1.0;
    /**
     * 百
     */
    public static final double HUNDRED = 100.0;
    /**
     * 千
     */
    public static final double THOUSAND = 1000.0;
    /**
     * 万
     */
    public static final double TEN_THOUSAND = 1_0000.0;
    /**
     * 百万
     */
    public static final double MILLION = 100_0000.0;

    /**
     * 计算两个参数的和,如果相加出现溢出那就返回{@code int}的最大值.
     * <p>
     * 区别于JDK的方法,仅仅认同判定方案,游戏世界,溢出时那就修正一个合理的值,一般调用此方法的游戏逻辑决不能因异常而中断
     *
     * @param x 第一个参数
     * @param y 第二个参数
     * @return 两个参数的和
     * @see Math#addExact(int, int)
     */
    public static int addExact(int x, int y) {
        try {
            return Math.addExact(x, y);
        } catch (ArithmeticException e) {
            return Integer.MAX_VALUE;
        }
    }

    /**
     * 计算两个参数的和,如果相加出现溢出那就返回{@code long}的最大值.
     * <p>
     * 区别于JDK的方法,仅仅认同判定方案,游戏世界,溢出时那就修正一个合理的值,一般调用此方法的游戏逻辑决不能因异常而中断
     *
     * @param x 第一个参数
     * @param y 第二个参数
     * @return 两个参数的和
     * @see Math#addExact(long, long)
     */
    public static long addExact(long x, long y) {
        try {
            return Math.addExact(x, y);
        } catch (ArithmeticException e) {
            return Long.MAX_VALUE;
        }
    }

    /**
     * 计算两个参数的乘积,如果相乘出现溢出那就返回{@code int}的最大值.
     * <p>
     * 区别于JDK的方法,仅仅认同判定方案,游戏世界,溢出时那就修正一个合理的值,一般调用此方法的游戏逻辑决不能因异常而中断
     *
     * @param x 第一个参数
     * @param y 第二个参数
     * @return 两个参数的乘积
     * @see Math#multiplyExact(int, int)
     */
    public static int multiplyExact(int x, int y) {
        try {
            return Math.multiplyExact(x, y);
        } catch (ArithmeticException e) {
            return Integer.MAX_VALUE;
        }
    }

    /**
     * 计算两个参数的乘积,如果相乘出现溢出那就返回{@code long}的最大值.
     * <p>
     * 区别于JDK的方法,仅仅认同判定方案,游戏世界,溢出时那就修正一个合理的值,一般调用此方法的游戏逻辑决不能因异常而中断
     *
     * @param x 第一个参数
     * @param y 第二个参数
     * @return 两个参数的乘积
     * @see Math#multiplyExact(long, long)
     */
    public static long multiplyExact(long x, long y) {
        try {
            return Math.multiplyExact(x, y);
        } catch (ArithmeticException e) {
            return Long.MAX_VALUE;
        }
    }

    /**
     * 计算两点(x1,y1)到(x2,y2)的距离.
     * <p>
     * Math.sqrt(|x1-x2|² + |y1-y2|²)
     *
     * @param x1 坐标X1
     * @param y1 坐标Y1
     * @param x2 坐标X2
     * @param y2 坐标Y2
     * @return 两点的距离
     */
    public static double distance(int x1, int y1, int x2, int y2) {
        final double x = Math.abs(x1 - x2);
        final double y = Math.abs(y1 - y2);
        return Math.sqrt(x * x + y * y);
    }

    /**
     * 计算两点(x1,y1)到(x2,y2)的距离.
     * <p>
     * Math.sqrt(|x1-x2|² + |y1-y2|²)
     *
     * @param x1 坐标X1
     * @param y1 坐标Y1
     * @param x2 坐标X2
     * @param y2 坐标Y2
     * @return 两点的距离
     */
    public static double distance(double x1, double y1, double x2, double y2) {
        final double x = Math.abs(x1 - x2);
        final double y = Math.abs(y1 - y2);
        return Math.sqrt(x * x + y * y);
    }

    /**
     * 计算两点P1(x1,y1)到P2(x2,y2)的距离.
     * <p>
     * Math.sqrt(|x1-x2|² + |y1-y2|²)
     *
     * @param p1 坐标1
     * @param p2 坐标2
     * @return 两点的距离
     */
    public static double distance(Point p1, Point p2) {
        return distance(p1.getX(), p1.getY(), p2.getX(), p2.getY());
    }

    /**
     * 判定两点(x1,y1)和(x2,y2)是否相邻.
     * <p>
     * 可用于两个AOI是否相邻判定
     *
     * @param x1 坐标X1
     * @param y1 坐标Y1
     * @param x2 坐标X2
     * @param y2 坐标Y2
     * @return 如果两坐标相邻返回true, 否则返回false
     */
    public static boolean adjacent(int x1, int y1, int x2, int y2) {
        return Math.abs(x1 - x2) <= 1 && Math.abs(y1 - y2) <= 1;
    }

    /**
     * 判定两点P1(x1,y1)和P2(x2,y2)是否相邻.
     * <p>
     * 可用于两个AOI是否相邻判定
     *
     * @param p1 坐标1
     * @param p2 坐标2
     * @return 如果两坐标相邻返回true, 否则返回false
     */
    public static boolean adjacent(Point p1, Point p2) {
        return adjacent(p1.getX(), p1.getY(), p2.getX(), p2.getY());
    }

    /**
     * 向下取整,并返回int值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向下取整后的int值
     */
    public static int floorInt(double a) {
        return (int) Math.floor(a);
    }

    /**
     * 向下取整,并返回long值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向下取整后的long值
     */
    public static long floorLong(double a) {
        return (long) Math.floor(a);
    }

    /**
     * 向上取整,并返回int值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向上取整后的int值
     */
    public static int ceilInt(double a) {
        return (int) Math.ceil(a);
    }

    /**
     * 向上取整,并返回long值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向上取整后的long值
     */
    public static long ceilLong(double a) {
        return (long) Math.ceil(a);
    }

    /**
     * 4舍5入取整,并返回int值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向上取整后的int值
     */
    public static int roundInt(double a) {
        return (int) Math.round(a);
    }


    public static int min(List<Integer> array) {
        int ret = Integer.MAX_VALUE;
        for (int e : array) {
            if (e < ret) {
                ret = e;
            }
        }
        return ret;
    }


    public static int min(int... array) {
        int ret = Integer.MAX_VALUE;
        for (int e : array) {
            if (e < ret) {
                ret = e;
            }
        }
        return ret;
    }

    public static int max(int... array) {
        int ret = Integer.MIN_VALUE;
        for (int e : array) {
            if (e > ret) {
                ret = e;
            }
        }
        return ret;
    }

    public static int max(List<Integer> array) {
        int ret = Integer.MIN_VALUE;
        for (int e : array) {
            if (e > ret) {
                ret = e;
            }
        }
        return ret;
    }

    /**
     * 4舍5入取整,并返回long值.
     *
     * @param a 一个带有小数的数值
     * @return 返回向上取整后的long值
     */
    public static long roundLong(double a) {
        return (long) Math.round(a);
    }

    /**
     * 格式化小数位数的方法.
     * <p>
     * 采用了{@link BigDecimal#setScale(int, RoundingMode)}方式来保留小数位数<br>
     * 默认舍入方式为4舍5入, 参考{@link RoundingMode#HALF_UP}
     *
     * @param value    原始值
     * @param newScale 保留小数位数
     * @return 返回要被保留指定小数位数的值.
     */
    public static float formatScale(float value, int newScale) {
        return formatScale(value, newScale, RoundingMode.HALF_UP);
    }

    /**
     * 格式化小数位数的方法.
     * <p>
     * 采用了{@link BigDecimal#setScale(int, RoundingMode)}方式来保留小数位数
     *
     * @param value    原始值
     * @param newScale 保留小数位数
     * @param mode     被保留位数后舍入方式,参考{@link RoundingMode}
     * @return 返回要被保留指定小数位数的值.
     */
    public static float formatScale(float value, int newScale, RoundingMode mode) {
        return BigDecimal.valueOf(value).setScale(newScale, mode).floatValue();
    }

    /**
     * 格式化小数位数的方法.
     * <p>
     * 采用了{@link BigDecimal#setScale(int, RoundingMode)}方式来保留小数位数<br>
     * 默认舍入方式为4舍5入, 参考{@link RoundingMode#HALF_UP}
     *
     * @param value    原始值
     * @param newScale 保留小数位数
     * @return 返回要被保留指定小数位数的值.
     */
    public static double formatScale(double value, int newScale) {
        return formatScale(value, newScale, RoundingMode.HALF_UP);
    }

    /**
     * 格式化小数位数的方法.
     * <p>
     * 采用了{@link BigDecimal#setScale(int, RoundingMode)}方式来保留小数位数
     *
     * @param value    原始值
     * @param newScale 保留小数位数
     * @param mode     被保留位数后舍入方式,参考{@link RoundingMode}
     * @return 返回要被保留指定小数位数的值.
     */
    public static double formatScale(double value, int newScale, RoundingMode mode) {
        return BigDecimal.valueOf(value).setScale(newScale, mode).doubleValue();
    }

    /**
     * N种资源掠夺最优计算方案.
     * <p>
     * 有N种资源,尝试抢其他的部分,但各种资源有一定的比例... <br>
     * 使用场景:SLG的城池掠夺资源计算
     *
     * @param <T>       资源类型
     * @param resources N种资源(参数选用LinkedHashMap,就是想按顺序优先扣前面的...)
     * @param max       掠夺的最大值
     * @param ratio     掠夺比例<b>建议:比例总和在100以内</b>
     * @return 一种最优的掠夺结果
     */
    public static <T> Map<T, Long> plunder(Map<T, Long> resources, long max, Map<T, Integer> ratio) {
        final Map<T, Long> result = new HashMap<>(resources.size());
        final int sum = ratio.values().stream().reduce(0, (a, b) -> a + b);
        final long step = max >= sum ? max / Math.min(1000, Math.max(10, ratio.values().stream().reduce(0, (a, b) -> a + b))) : max;
        // 总计要抢的资源量
        long total = max;

        while (total > 0) {
            // 标识是否还有资源可以抢...
            boolean flag = false;
            for (Map.Entry<T, Long> e : resources.entrySet()) {
                if (e.getValue() <= 0) {
                    continue;
                }

                // 只要有一种资源大于0都算还有资源
                flag = true;

                // 比例+小步长随便,让抢出来的资源效果更好些...
                long selfStep = step * ratio.getOrDefault(e.getKey(), 1) + RandomUtils.nextLong(step);
                long temp = Math.min(selfStep, total);

                // 如果资源不足,就以当前有的抢光就好了...
                if (e.getValue() < temp) {
                    temp = e.getValue();
                }

                // 最终本次抢的值
                final long value = temp;
                e.setValue(e.getValue() - value);
                total -= temp;
                result.compute(e.getKey(), (k, v) -> v == null ? value : v + value);

                // 抢满了就退出啦...
                if (total <= 0) {
                    break;
                }
            }

            // 没有资源可以抢时,就直接退出了...
            if (!flag) {
                break;
            }
        }
        return result;
    }

    /**
     * long类型的数值按比率转化为double类型的值.
     * <p>
     * 由于配置表在转化中精度丢失问题,建议策划配置的是long类型的数值,所以就有了这个转化方法。 <br>
     * 比如:约定XX列为百分比,那配置50,就是50%,等于0.5
     *
     * @param value long类型的数值
     * @param ratio 比率
     * @return double类型的值
     */
    public static double longToDouble(long value, double ratio) {
        return value / ratio;
    }

    /**
     * long类型的数值以千分比转化为double类型的值.
     * <p>
     * 参考 {@link MathUtils#longToDouble(long, double)}
     *
     * @param value long类型的数值
     * @return double类型的值
     */
    public static double permillage(long value) {
        return MathUtils.longToDouble(value, MathUtils.THOUSAND);
    }

    /**
     * long类型的数值以百分比转化为double类型的值.
     * <p>
     * 参考 {@link MathUtils#longToDouble(long, double)}
     *
     * @param value long类型的数值
     * @return double类型的值
     */
    public static double percentage(long value) {
        return MathUtils.longToDouble(value, MathUtils.HUNDRED);
    }

    /**格式化乘百分比
     * @param value 待格式化的数值
     * @return 格式化后的字符串*/

    public static String prettyPercentage(double value){
        NumberFormat nf = NumberFormat.getPercentInstance();
        nf.setMinimumFractionDigits(2);
        return nf.format(value);
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/MethodUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */
package io.gamioo.common.util;


import io.gamioo.common.exception.NoPublicMethodException;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 方法工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class MethodUtils {

    /**
     * 强制调用一个方法{@link Method}.
     *
     * @param target 目标对象
     * @param method 要调用的方法
     * @param args   方法参数
     * @return 返回方法的返回值
     */
    public static Object invoke(final Object target, final Method method, final Object... args) {
        if (!method.isAccessible()) {
            method.setAccessible(true);
        }
        try {
            return method.invoke(target, args);
        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
            throw new RuntimeException("反射调用方式时出现了异常情况...", e);
        }
    }

    /**
     * 获取指定类的所有方法,包含父类的方法.
     *
     * @param klass 指定类
     * @return 指定类的方法集合.
     */
    public static List<Method> getMethodList(final Class<?> klass) {
        Set<Method> result = new HashSet<>();
        for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) {
            for (Method method : target.getDeclaredMethods()) {
                result.add(method);
            }
        }
        return new ArrayList<>(result);
    }

    /**
     * 获取指定类中的指定名称和参数的方法
     *
     * @param klass          类
     * @param name           方法名称
     * @param parameterTypes 方法参数
     * @return 方法
     */
    public static Method getMethod(Class<?> klass, String name, Class<?>... parameterTypes) {
        try {
            return klass.getMethod(name, parameterTypes);
        } catch (NoSuchMethodException | SecurityException e) {
            throw new NoPublicMethodException(e.getMessage());
        }
    }

    /**
     * 判定指定类是否存在Set方法.
     *
     * @param klass 指定类
     * @return 如果存在则返回true, 否则返回false.
     */
    public static boolean existSetMethod(Class<?> klass) {
        for (Class<?> target = klass; target != Object.class; target = target.getSuperclass()) {
            for (Method method : target.getDeclaredMethods()) {
                if (method.getName().startsWith("set")) {
                    return true;
                }
            }
        }
        return false;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/NativeUtils.java
================================================
package io.gamioo.common.util;


import org.apache.commons.lang3.SystemUtils;

import java.io.*;

/**
 * 用于加载native dll的工具类
 */
public class NativeUtils {
    public static void loadLibrary(String name) throws IOException {
        String suffix = "";
        //TODO 暂时只为两种系统服务
        if (SystemUtils.IS_OS_LINUX) {
            suffix += ".so";
        } else {
            suffix += ".dll";
        }
        try (InputStream inputStream = FileUtils.getInputStream(name + suffix); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
            byte[] buffer = new byte[1024];
            int n = 0;
            while (-1 != (n = inputStream.read(buffer))) {
                out.write(buffer, 0, n);
            }
            File file = File.createTempFile(name, suffix);
            try (FileOutputStream fileOutputStream = new FileOutputStream(file)) {
                fileOutputStream.write(out.toByteArray());
            }
            System.load(file.getAbsolutePath());
        }
    }

}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/RandomUtils.java
================================================
/*
 * Copyright 2015-2020 gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.ToIntFunction;

/**
 * 随机数相关操作工具类.
 * <p>
 * 本工具类中统一以{@link ThreadLocalRandom}为基础的封装
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class RandomUtils {

    private RandomUtils() {
    }

    /**
     * 返回一个随机Boolean值.
     *
     * @return 随机Boolean值
     */
    public static boolean nextBoolean() {
        return ThreadLocalRandom.current().nextBoolean();
    }

    /**
     * 返回一个0到指定区间的随机数字.
     * <p>
     * 0 &lt;= random &lt; bound
     *
     * @param bound 最大值(不包含)
     * @return 返回一个0到指定区间的随机数字
     */
    public static int nextInt(int bound) {
        return ThreadLocalRandom.current().nextInt(bound);
    }

    /**
     * 返回一个指定区间的随机数字.
     * <p>
     * origin &lt;= random &lt; bound
     *
     * @param origin 最小值(包含)
     * @param bound  最大值(不包含)
     * @return 返回一个指定区间的随机数字
     */
    public static int nextInt(int origin, int bound) {
        return ThreadLocalRandom.current().nextInt(origin, bound);
    }

    /**
     * 返回一个0到指定区间的随机数字.
     * <p>
     * 0 &lt;= random &lt; bound
     *
     * @param bound 最大值(不包含)
     * @return 返回一个0到指定区间的随机数字
     */
    public static long nextLong(long bound) {
        return ThreadLocalRandom.current().nextLong(bound);
    }

    /**
     * 返回一个指定区间的随机数字.
     * <p>
     * origin &lt;= random &lt; bound
     *
     * @param origin 最小值(包含)
     * @param bound  最大值(不包含)
     * @return 返回一个指定区间的随机数字
     */
    public static long nextLong(long origin, long bound) {
        return ThreadLocalRandom.current().nextLong(origin, bound);
    }

    /**
     * 返回一个随机Double值.
     *
     * @return 随机Double值
     */
    public static double nextDouble() {
        return ThreadLocalRandom.current().nextDouble();
    }

    /**
     * 判定一次随机事件是否成功.
     *
     * <pre>
     * 如果rate&gt;=1,则百分百返回true.<br>
     * 如果rate&lt;=0,则百分百返回false.
     * </pre>
     *
     * @param rate 成功率
     * @return 如果成功返回true, 否则返回false.
     */
    public static boolean isSuccess(float rate) {
        return ThreadLocalRandom.current().nextFloat() < rate;
    }

    /**
     * 判定一次随机事件是否成功.
     *
     * <pre>
     * 如果rate&gt;=1,则百分百返回true.<br>
     * 如果rate&lt;=0,则百分百返回false.
     * </pre>
     *
     * @param rate 成功率
     * @return 如果成功返回true, 否则返回false.
     */
    public static boolean isSuccess(double rate) {
        return ThreadLocalRandom.current().nextDouble() < rate;
    }

    /**
     * 判定一次百分比的随机事件是否成功.
     * <p>
     * 参数自动转化为百分比单位,就是除100
     *
     * <pre>
     * RandomUtils.isSuccessByPercentage(rate) = RandomUtils.isSuccess(rate / 100D)
     * </pre>
     *
     * @param rate 成功率/100D
     * @return 如果成功返回true, 否则返回false.
     */
    public static boolean isSuccessByPercentage(long rate) {
        return isSuccess(rate / MathUtils.HUNDRED);
    }

    /**
     * 判定一次千分比的随机事件是否成功.
     * <p>
     * 参数自动转化为千分比单位,就是除1000
     *
     * <pre>
     * RandomUtils.isSuccessByPermillage(rate) = RandomUtils.isSuccess(rate / 1000D)
     * </pre>
     *
     * @param rate 成功率/1000D
     * @return 如果成功返回true, 否则返回false.
     */
    public static boolean isSuccessByPermillage(long rate) {
        return isSuccess(rate / MathUtils.THOUSAND);
    }

    /**
     * 在指定集合中随机出一个元素.
     * <p>
     * 所以元素无权重的随机.
     *
     * @param <T>  要随机集合里的元素类型
     * @param list 指定集合
     * @return 随机返回集合中的一个元素.
     */
    public static <T> T randomList(List<T> list) {
        // 没有东东的集合,随机个毛线啊...
        if (list == null || list.isEmpty()) {
            return null;
        }
        return list.get(nextInt(list.size()));
    }

    /**
     * 从一个List集合中随机出指定数量的元素.
     * <p>
     * <code>
     * source = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]<br>
     * random(source, 5) = [5, 3, 6, 7, 2]
     * </code>
     *
     * @param <T>    要随机集合里的元素类型
     * @param source List集合
     * @param num    指定数量
     * @return 如果源为空或指定数量小于1,则返回空集合,否则随机抽取元素组装新集合并返回
     */
    @SuppressWarnings("unchecked")
    public static <T> List<T> randomList(final List<T> source, int num) {
        // 没有源或要取的数小于1个就直接返回空列表
        if (source == null || num < 1) {
            return Collections.emptyList();
        }

        // 数量刚刚好
        if (source.size() <= num) {
            List<T> result = new ArrayList<>(source);
            Collections.shuffle(source);
            return result;
        }

        // 随机位,最后一个元素向前移动的方式
        Object[] rs = source.toArray();
        List<T> result = new ArrayList<>(num);
        for (int i = 0; i < num; i++) {
            int index = nextInt(rs.length - i);
            result.add((T) rs[index]);
            rs[index] = rs[rs.length - 1 - i];
        }
        return result;
    }

    /**
     * 在指定集合中按权重随机出一个元素.
     * <p>
     * K为元素,如果是自定义对象记得重写HashCode和equals.<br>
     * V为权重,机率为V/(sum(All))
     *
     * @param <K>  要随机的元素类型,也是Map的Key
     * @param data 随机集合
     * @return 按权重随机返回集合中的一个元素.
     */
    public static <K> K randomByWeight(Map<K, Integer> data) {
        final int sum = data.values().stream().reduce(0, (a, b) -> a + b);
        if (sum <= 0) {
            return randomList(new ArrayList<>(data.keySet()));
        }

        final int random = nextInt(sum);
        int step = 0;
        for (Map.Entry<K, Integer> e : data.entrySet()) {
            step += e.getValue().intValue();
            if (step > random) {
                return e.getKey();
            }
        }
        throw new RuntimeException("randomByWeight的实现有Bug:" + random);
    }

    /**
     * 在指定集合中按权重随机出一个元素.
     * <p>
     * 权重,机率为V/(sum(All))
     *
     * @param <T>            要随机的元素类型
     * @param data           随机集合
     * @param weightFunction 元素中权重方法
     * @return 按权重随机返回集合中的一个元素
     */
    public static <T> T randomByWeight(List<T> data, ToIntFunction<? super T> weightFunction) {
        final int sum = data.stream().mapToInt(weightFunction).reduce(0, (a, b) -> a + b);
        if (sum <= 0) {
            return randomList(data);
        }

        final int random = nextInt(sum);
        int step = 0;
        for (T e : data) {
            step += weightFunction.applyAsInt(e);
            if (step > random) {
                return e;
            }
        }
        throw new RuntimeException("randomByWeight的实现有Bug:" + random);
    }

    /**
     * 在指定集合中按权重随机出指定数量个元素.
     * <p>
     * 权重,机率为V/(sum(All))
     *
     * @param <T>            要随机的元素类型
     * @param data           随机集合
     * @param weightFunction 元素中权重方法
     * @param num            指定数量
     * @return 按权重随机返回集合中的指定数量个元素
     */
    public static <T> List<T> randomByWeight(List<T> data, ToIntFunction<? super T> weightFunction, int num) {
        if (num <= 0) {
            return Collections.emptyList();
        }

        final int sum = data.stream().mapToInt(weightFunction).reduce(0, (a, b) -> a + b);
        if (sum <= 0) {
            return randomList(data, num);
        }

        List<T> result = new ArrayList<>(num);
        for (int i = 1; i <= num; i++) {
            final int random = nextInt(sum);
            int step = 0;
            for (T e : data) {
                step += weightFunction.applyAsInt(e);
                if (step > random) {
                    result.add(e);
                    break;
                }
            }
        }
        return result;
    }

    /**
     * 区间随机
     * <p>
     * max - min
     *
     * @param min 起始值
     * @param max 结束值
     * @return 随机数
     */
    public static int randomBetween(int min, int max) {
        return ThreadLocalRandom.current().nextInt(max - min + 1) + min;
    }


    /**
     * 以 numerator/denominator的概率随机触发
     *
     * @param numerator   分子
     * @param denominator 分母
     * @return 是否触发
     * @throws IllegalArgumentException 分母为0时抛出异常,无法判断此时期望的return
     */
    public static boolean trigger(int numerator, int denominator) {
        if (denominator <= 0) {
            throw new IllegalArgumentException("denominator=" + denominator);
        }
        if (numerator <= 0) {
            return false;
        }
        if (numerator > denominator) {
            return true;
        }
        return nextInt(0, denominator) < numerator;
    }
}

================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/ResourceUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

import org.apache.commons.lang3.StringUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.net.*;

/**
 * some description
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class ResourceUtils {


    /** Pseudo URL prefix for loading from the class path: "classpath:" */
    public static final String CLASSPATH_URL_PREFIX = "classpath:";

    /** URL prefix for loading from the file system: "file:" */
    public static final String FILE_URL_PREFIX = "file:";

    /** URL prefix for loading from the file system: "jar:" */
    public static final String JAR_URL_PREFIX = "jar:";

    /** URL protocol for a file in the file system: "file" */
    public static final String URL_PROTOCOL_FILE = "file";

    /** URL protocol for an entry from a jar file: "jar" */
    public static final String URL_PROTOCOL_JAR = "jar";

    /** URL protocol for an entry from a zip file: "zip" */
    public static final String URL_PROTOCOL_ZIP = "zip";

    /** URL protocol for an entry from a WebSphere jar file: "wsjar" */
    public static final String URL_PROTOCOL_WSJAR = "wsjar";

    /** URL protocol for an entry from a JBoss jar file: "vfszip" */
    public static final String URL_PROTOCOL_VFSZIP = "vfszip";

    /** URL protocol for a JBoss file system resource: "vfsfile" */
    public static final String URL_PROTOCOL_VFSFILE = "vfsfile";

    /** URL protocol for a general JBoss VFS resource: "vfs" */
    public static final String URL_PROTOCOL_VFS = "vfs";

    /** File extension for a regular jar file: ".jar" */
    public static final String JAR_FILE_EXTENSION = ".jar";

    /** Separator between JAR URL and file path within the JAR: "!/" */
    public static final String JAR_URL_SEPARATOR = "!/";


    /**
     * Return whether the given resource location is a URL:
     * either a special "classpath" pseudo URL or a standard URL.
     * @param resourceLocation the location String to check
     * @return whether the location qualifies as a URL
     * @see #CLASSPATH_URL_PREFIX
     * @see java.net.URL
     */
    public static boolean isUrl(String resourceLocation) {
        if (resourceLocation == null) {
            return false;
        }
        if (resourceLocation.startsWith(CLASSPATH_URL_PREFIX)) {
            return true;
        }
        try {
            new URL(resourceLocation);
            return true;
        }
        catch (MalformedURLException ex) {
            return false;
        }
    }

    /**
     * Resolve the given resource location to a {@code java.net.URL}.
     * <p>Does not check whether the URL actually exists; simply returns
     * the URL that the given location would correspond to.
     * @param resourceLocation the resource location to resolve: either a
     * "classpath:" pseudo URL, a "file:" URL, or a plain file path
     * @return a corresponding URL object
     * @throws FileNotFoundException if the resource cannot be resolved to a URL
     */
    public static URL getURL(String resourceLocation) throws FileNotFoundException {
        Assert.notNull(resourceLocation, "Resource location must not be null");
        if (resourceLocation.startsWith(CLASSPATH_URL_PREFIX)) {
            String path = resourceLocation.substring(CLASSPATH_URL_PREFIX.length());
            ClassLoader cl = ClassUtils.getDefaultClassLoader();
            URL url = (cl != null ? cl.getResource(path) : ClassLoader.getSystemResource(path));
            if (url == null) {
                String description = "class path resource [" + path + "]";
                throw new FileNotFoundException(description +
                        " cannot be resolved to URL because it does not exist");
            }
            return url;
        }
        try {
            // try URL
            return new URL(resourceLocation);
        }
        catch (MalformedURLException ex) {
            // no URL -> treat as file path
            try {
                return new File(resourceLocation).toURI().toURL();
            }
            catch (MalformedURLException ex2) {
                throw new FileNotFoundException("Resource location [" + resourceLocation +
                        "] is neither a URL not a well-formed file path");
            }
        }
    }

    /**
     * Resolve the given resource location to a {@code java.io.File},
     * i.e. to a file in the file system.
     * <p>Does not check whether the file actually exists; simply returns
     * the File that the given location would correspond to.
     * @param resourceLocation the resource location to resolve: either a
     * "classpath:" pseudo URL, a "file:" URL, or a plain file path
     * @return a corresponding File object
     * @throws FileNotFoundException if the resource cannot be resolved to
     * a file in the file system
     */
    public static File getFile(String resourceLocation) throws FileNotFoundException {
        Assert.notNull(resourceLocation, "Resource location must not be null");
        if (resourceLocation.startsWith(CLASSPATH_URL_PREFIX)) {
            String path = resourceLocation.substring(CLASSPATH_URL_PREFIX.length());
            String description = "class path resource [" + path + "]";
            ClassLoader cl = ClassUtils.getDefaultClassLoader();
            URL url = (cl != null ? cl.getResource(path) : ClassLoader.getSystemResource(path));
            if (url == null) {
                throw new FileNotFoundException(description +
                        " cannot be resolved to absolute file path because it does not exist");
            }
            return getFile(url, description);
        }
        try {
            // try URL
            return getFile(new URL(resourceLocation));
        }
        catch (MalformedURLException ex) {
            // no URL -> treat as file path
            return new File(resourceLocation);
        }
    }

    /**
     * Resolve the given resource URL to a {@code java.io.File},
     * i.e. to a file in the file system.
     * @param resourceUrl the resource URL to resolve
     * @return a corresponding File object
     * @throws FileNotFoundException if the URL cannot be resolved to
     * a file in the file system
     */
    public static File getFile(URL resourceUrl) throws FileNotFoundException {
        return getFile(resourceUrl, "URL");
    }

    /**
     * Resolve the given resource URL to a {@code java.io.File},
     * i.e. to a file in the file system.
     * @param resourceUrl the resource URL to resolve
     * @param description a description of the original resource that
     * the URL was created for (for example, a class path location)
     * @return a corresponding File object
     * @throws FileNotFoundException if the URL cannot be resolved to
     * a file in the file system
     */
    public static File getFile(URL resourceUrl, String description) throws FileNotFoundException {
        Assert.notNull(resourceUrl, "Resource URL must not be null");
        if (!URL_PROTOCOL_FILE.equals(resourceUrl.getProtocol())) {
            throw new FileNotFoundException(
                    description + " cannot be resolved to absolute file path " +
                            "because it does not reside in the file system: " + resourceUrl);
        }
        try {
            return new File(toURI(resourceUrl).getSchemeSpecificPart());
        }
        catch (URISyntaxException ex) {
            // Fallback for URLs that are not valid URIs (should hardly ever happen).
            return new File(resourceUrl.getFile());
        }
    }

    /**
     * Resolve the given resource URI to a {@code java.io.File},
     * i.e. to a file in the file system.
     * @param resourceUri the resource URI to resolve
     * @return a corresponding File object
     * @throws FileNotFoundException if the URL cannot be resolved to
     * a file in the file system
     */
    public static File getFile(URI resourceUri) throws FileNotFoundException {
        return getFile(resourceUri, "URI");
    }

    /**
     * Resolve the given resource URI to a {@code java.io.File},
     * i.e. to a file in the file system.
     * @param resourceUri the resource URI to resolve
     * @param description a description of the original resource that
     * the URI was created for (for example, a class path location)
     * @return a corresponding File object
     * @throws FileNotFoundException if the URL cannot be resolved to
     * a file in the file system
     */
    public static File getFile(URI resourceUri, String description) throws FileNotFoundException {
        Assert.notNull(resourceUri, "Resource URI must not be null");
        if (!URL_PROTOCOL_FILE.equals(resourceUri.getScheme())) {
            throw new FileNotFoundException(
                    description + " cannot be resolved to absolute file path " +
                            "because it does not reside in the file system: " + resourceUri);
        }
        return new File(resourceUri.getSchemeSpecificPart());
    }

    /**
     * Determine whether the given URL points to a resource in the file system,
     * that is, has protocol "file", "vfsfile" or "vfs".
     * @param url the URL to check
     * @return whether the URL has been identified as a file system URL
     */
    public static boolean isFileURL(URL url) {
        String protocol = url.getProtocol();
        return (URL_PROTOCOL_FILE.equals(protocol) || URL_PROTOCOL_VFSFILE.equals(protocol) ||
                URL_PROTOCOL_VFS.equals(protocol));
    }

    /**
     * Determine whether the given URL points to a resource in a jar file,
     * that is, has protocol "jar", "zip", "vfszip" or "wsjar".
     * @param url the URL to check
     * @return whether the URL has been identified as a JAR URL
     */
    public static boolean isJarURL(URL url) {
        String protocol = url.getProtocol();
        return (URL_PROTOCOL_JAR.equals(protocol) || URL_PROTOCOL_ZIP.equals(protocol) ||
                URL_PROTOCOL_VFSZIP.equals(protocol) || URL_PROTOCOL_WSJAR.equals(protocol));
    }

    /**
     * Determine whether the given URL points to a jar file itself,
     * that is, has protocol "file" and ends with the ".jar" extension.
     * @param url the URL to check
     * @return whether the URL has been identified as a JAR file URL
     * @since 4.1
     */
    public static boolean isJarFileURL(URL url) {
        return (URL_PROTOCOL_FILE.equals(url.getProtocol()) &&
                url.getPath().toLowerCase().endsWith(JAR_FILE_EXTENSION));
    }

    /**
     * Extract the URL for the actual jar file from the given URL
     * (which may point to a resource in a jar file or to a jar file itself).
     * @param jarUrl the original URL
     * @return the URL for the actual jar file
     * @throws MalformedURLException if no valid jar file URL could be extracted
     */
    public static URL extractJarFileURL(URL jarUrl) throws MalformedURLException {
        String urlFile = jarUrl.getFile();
        int separatorIndex = urlFile.indexOf(JAR_URL_SEPARATOR);
        if (separatorIndex != -1) {
            String jarFile = urlFile.substring(0, separatorIndex);
            try {
                return new URL(jarFile);
            }
            catch (MalformedURLException ex) {
                // Probably no protocol in original jar URL, like "jar:C:/mypath/myjar.jar".
                // This usually indicates that the jar file resides in the file system.
                if (!jarFile.startsWith("/")) {
                    jarFile = "/" + jarFile;
                }
                return new URL(FILE_URL_PREFIX + jarFile);
            }
        }
        else {
            return jarUrl;
        }
    }

    /**
     * Create a URI instance for the given URL,
     * replacing spaces with "%20" URI encoding first.
     * <p>Furthermore, this method works on JDK 1.4 as well,
     * in contrast to the {@code URL.toURI()} method.
     * @param url the URL to convert into a URI instance
     * @return the URI instance
     * @throws URISyntaxException if the URL wasn't a valid URI
     * @see java.net.URL#toURI()
     */
    public static URI toURI(URL url) throws URISyntaxException {
        return toURI(url.toString());
    }

    /**
     * Create a URI instance for the given location String,
     * replacing spaces with "%20" URI encoding first.
     * @param location the location String to convert into a URI instance
     * @return the URI instance
     * @throws URISyntaxException if the location wasn't a valid URI
     */
    public static URI toURI(String location) throws URISyntaxException {
        return new URI(StringUtils.replace(location, " ", "%20"));
    }

    /**
     * Set the {@link URLConnection#setUseCaches "useCaches"} flag on the
     * given connection, preferring {@code false} but leaving the
     * flag at {@code true} for JNLP based resources.
     * @param con the URLConnection to set the flag on
     */
    public static void useCachesIfNecessary(URLConnection con) {
        con.setUseCaches(con.getClass().getSimpleName().startsWith("JNLP"));
    }


}


================================================
FILE: gamioo-common/src/main/java/io/gamioo/common/util/StringUtils.java
================================================
/*
 * Copyright 2015-2020 Gamioo Authors.
 *
 * 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
 *
 *      http://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.
 */

package io.gamioo.common.util;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 字符串工具类.
 *
 * @author Allen Jiang
 * @since 1.0.0
 */
public class StringUtils {
    private static Pattern NUMBER_PATTERN = Pattern.compile("[0-9]+");
    /**
     * 空字符串 {@code ""}.
     */
    public static final String EMPTY = "";
    /**
     * 一个空格字符串 {@code " "}
     */
    public static final String SPACE = " ";
    /**
     * 一个换行字符串 {@code "\n"}
     */
    public static final String LF = "\n";
    /**
     * 一个回车字符串 {@code "\r"}
     */
    public static final String CR = "\r";
    /**
     * 一个英文逗号字符串 {@code ","}
     */
    public static final String COMMA = ",";
    /**
     * 一个英文连字符字符串 {@code "-"}
     */
    public static final String HYPHEN = "-";

    /**
     * 一个英文左括号字符串 {@code "("}
     */
    public static final String LPAREN = "(";
    /**
     * 一个英文右括号字符串 {@code ")"}
     */
    public static final String RPAREN = ")";
    /**
     * 一个英文左大括号字符串 "{"
     */
    public static final String LBRACE = "{";
    /**
     * 一个英文右大括号字符串 "}"
     */
    public static final String RBRACE = "}";
    /**
     * 一个英文左中括号字符串 {@code "["}
     */
    public static final String LBRACKET = "[";
    /**
     * 一个英文右中括号字符串 {@code "]"}
     */
    public static final String RBRACKET = "]";
    /**
     * 一个英文冒号字符串 {@code ":"}
     */
    public static final String COLON = ":";
    /**
     * 一个英文星号字符串 {@code "*"}
     */
    public static final String ASTERISK = "*";
    /**
     * 一个空字符串数组.
     */
    public static final String[] EMPTY_STRING_ARRAY = {};

    /**
     * 检测字符串是否为 null或"".
     *
     * <pre>
     * StringUtils.isEmpty(null)      = true
     * StringUtils.isEmpty("")        = true
     * StringUtils.isEmpty(" ")       = false
     * StringUtils.isEmpty("test")     = false
     * StringUtils.isEmpty("  test  ") = false
     * </pre>
     *
     * @param text 被检测字符串
     * @return 如果字符为null或""则返回true,否则返回false.
     */
    public static boolean isEmpty(final String text) {
        return text == null || text.length() == 0;
    }

    /**
     * 检测字符串是否不为 null且不为"".
     *
     * <pre>
     * StringUtils.isNotEmpty(null)      = false
     * StringUtils.isNotEmpty("")        = false
     * StringUtils.isNotEmpty(" ")       = true
     * StringUtils.isNotEmpty("test")    = true
     * StringUtils.isNotEmpty("  test ") = true
     * </pre>
     *
     * @param text 被检测字符串
     * @return 如果字符不为 null且不为""则返回true,否则返回false.
     */
    public static boolean isNotEmpty(final String text) {
        return !isEmpty(text);
    }

    /**
     * 检测字符串是否为空,null或Java空白字符。
     * <p>
     * Java空白字符的定义请参考{@link Character#isWhitespace(char)}.
     *
     * <pre>
     * StringUtils.isBlank(null)      = true
     * StringUtils.isBlank("")        = true
     * StringUtils.isBlank(" ")       = true
     * StringUtils.isBlank("bob")     = false
     * StringUtils.isBlank("  bob  ") = false
     * </pre>
     *
     * @param text 被检测字符串
     * @return 如果字符串为空,null或Java空白字符则返回true,否则返回false.
     */
    public static boolean isBlank(final String text) {
        if (text == null) {
            return true;
        }
        // 只要有一个字符不为空白,那就肯定不是空白
        for (int i = 0, len = text.length(); i < len; i++) {
            if (!Character.isWhitespace(text.charAt(i))) {
                return false;
            }
        }
        return true;
    }

    /**
     * 检测字符串是否不为空,null或Java空白字符。
     * <p>
     * Java空白字符的定义请参考{@link Character#isWhitespace(char)}.
     *
     * <pre>
     * StringUtils.isNotBlank(null)      = false
     * StringUtils.isNotBlank("")        = false
     * StringUtils.isNotBlank(" ")       = false
     * StringUtils.isNotBlank("bob")     = true
     * StringUtils.isNotBlank("  bob  ") = true
     * </pre>
     *
     * @param text 被检测字符串
     * @return 如果字符串不为空,null或Java空白字符则返回true,否则返回false.
     */
    public static boolean isNotBlank(final String text) {
        return !isBlank(text);
    }

    /**
     * 检测一个字符串长度.
     * <p>
     * 字符串有可能包含中文等其他文字,中文应该算2个长度.
     *
     * @param text 被检测字符串
     * @return 字符串长度
     */
    public static int length(final String text) {
        if (text == null) {
            return 0;
        }

        int sum = 0;
        for (int i = 0, len = text.length(); i < len; i++) {
            sum += text.charAt(i) > 127 ? 2 : 1;
        }
        return sum;
    }

    /**
     * <p>
     * Splits the provided text into an array, separators specified. This is an alternative to using StringTokenizer.
     * </p>
     *
     * <p>
     * The separator is not included in the returned String array. Adjacent separators are treated as one separator. For more control over the split use the StrTokenizer class.
     * </p>
     *
     * <p>
     * A {@code null} input String returns {@code null}. A {@code null} separatorChars splits on whitespace.
     * </p>
     *
     * <pre>
     * StringUtils.split(null, *)         = null
     * StringUtils.split("", *)           = []
     * StringUtils.split("abc def", null) = ["abc", "def"]
     * StringUtils.split("abc def", " ")  = ["abc", "def"]
     * StringUtils.split("abc  def", " ") = ["abc", "def"]
     * StringUtils.split("ab:cd:ef", ":") = ["ab", "cd", "ef"]
     * </pre>
     *
     * @param str            the String to parse, may be null
     * @param separatorChars the characters used as the delimiters, {@code null} splits on whitespace
     * @return an array of parsed Strings, {@code null} if null String input
     */
    public static String[] split(final String str, final String separatorChars) {
        return splitWorker(str, separatorChars, -1, false);
    }

    /**
     * Performs the logic for the {@code split} and {@code splitPreserveAllTokens} methods that return a maximum array length.
     *
     * @param str               the String to parse, may be {@code null}
     * @param separatorChars    the separate character
     * @param max               the maximum number of elements to include in the array. A zero or negative value implies no limit.
     * @param preserveAllTokens if {@code true}, adjacent separators are treated as empty token separators; if {@code false}, adjacent separators are treated as one separator.
     * @return an array of parsed Strings, {@code null} if null String input
     */
    private static String[] splitWorker(final String str, final String separatorChars, final int max, final boolean preserveAllTokens) {
        if (str == null) {
            return EMPTY_STRING_ARRAY;
        }
        final int len = str.length();
        if (len == 0) {
            return EMPTY_STRING_ARRAY;
        }
        final List<String> list = new ArrayList<>();
        int sizePlus1 = 1;
        int i = 0, start = 0;
        boolean match = false;
        boolean lastMatch = false;
        if (separatorChars == null) {
            while (i < len) {
                if (Character.isWhitespace(str.charAt(i))) {
                    if (match || preserveAllTokens) {
                        lastMatch = true;
                        if (sizePlus1++ == max) {
                            i = len;
                            lastMatch = false;
                        }
                        list.add(str.substring(start, i));
                        match = false;
                    }
                    start = ++i;
                    continue;
                }
                lastMatch = false;
                match = true;
                i++;
            }
        } else if (separatorChars.length() == 1) {
            final char sep = separatorChars.charAt(0);
            while (i < len) {
                if (str.charAt(i) == sep) {
                    if (match || preserveAllTokens) {
                        lastMatch = true;
                        if (sizePlus1++ == max) {
                            i = len;
                            lastMatch = false;
                        }
                        list.add(str.substring(start, i));
                        match = false;
                    }
                    start = ++i;
                    continue;
                }
                lastMatch = false;
                match = true;
                i++;
            }
        } else {
            while (i < len) {
                if (separatorChars.indexOf(str.charAt(i)) >= 0) {
                    if (match || preserveAllTokens) {
                        lastMatch = true;
                        if (sizePlus1++ == max) {
                            i = len;
                            lastMatch = false;
                        }
                        list.add(str.substring(start, i));
                        match = false;
                    }
                    start = ++i;
                    continue;
                }
                lastMatch = false;
                match = true;
                i++;
            }
        }
        final boolean flag = preserveAllTokens && lastMatch;
        if (match || flag) {
            list.add(str.substring(start, i));
        }
        return list.toArray(new String[0]);
    }

    /**
     * 将一个字符串由驼峰式命名变成分割符分隔单词
     *
     * <pre>
     *  lowerWord("helloWorld", '_') =&gt; "hello_world"
     * </pre>
     *
     * @param cs 字符串
     * @param c  分隔符
     * @return 转换后字符串
     */
    public static String lowerWord(CharSequence cs, char c) {
        int len = cs.length();
        StringBuilder sb = new StringBuilder(len + 5);
        for (int i = 0; i < len; i++) {
            char ch = cs.charAt(i);
            if (Character.isUpperCase(ch)) {
                if (i > 0) {
                    sb.append(c);
                }
                sb.append(Character.toLowerCase(ch));
            } else {
                sb.append(ch);
            }
        }
        return sb.toString();
    }

    /**
     * 计算一个Long类型的数字的文本长度.
     * <p>
     * 包含负数计算
     *
     * @param v Long类型的数字
     * @return 数字的文本长度
     */
    public static int asciiSizeInBytes(long v) {
        if (v == 0) {
            return 1;
        }
        if (v == Long.MIN_VALUE) {
            return 20;
        }
        boolean negative = false;
        if (v < 0) {
            v = -v;
            negative = true;
        }
        int width = v < 100000000L
                //
                ? v < 10000L
                //
                ? v < 100L ? v < 10L ? 1 : 2 : v < 1000L ? 3 : 4
                //
                : v < 1000000L ? v < 100000L ? 5 : 6 : v < 10000000L ? 7 : 8
                //
                : v < 1000000000000L
                //
                ? v < 10000000000L ? v < 1000000000L ? 9 : 10 : v < 100000000000L ? 11 : 12
                //
                : v < 1000000000000000L
                //
                ? v < 10000000000000L ? 13 : v < 10000000000000L ? 14 : 15
                //
                : v < 100000000000000000L
                //
                ? v < 10000000000000000L ? 16 : 17
                //
                : v < 1000000000000000000L ? 18 : 19;
        //
        return negative ? width + 1 : width;
    }

    /**
     * 拼接字符串.
     *
     * @param strings 需要拼接的字串
     * @return 拼接后的字符串
     */
    public static String join(String... strings) {
        int len = 0;
        for (String str : strings) {
            len += str.length();
        }
        final StringBuilder result = new StringBuilder(len);
        for (String str : strings) {
            result.append(str);
        }
        return result.toString();
    }

    /**
     * 拼接路径字符串.
     *
     * @param paths 需要拼接的路径字串
     * @return 拼接后的路径字符串
     */
    public static String pathJoin(String... paths) {
        int len = 0;
        for (String str : paths) {
            len += str.length() + 1;
        }
        final StringBuilder sb = new StringBuilder(len);
        for (String str : paths) {
            sb.append(str);
            if (sb.length() > 0 && sb.charAt(sb.length() - 1) != '/') {
                sb.append('/');
            }
        }
        return sb.toString();
    }

    /**
     * 拼接字符串.
     * <p>
     * 在比较长或多的情况计算长度比StringJoiner性能好.<br>
     *
     * <pre>
     *     StringJoiner result = new StringJoiner(delimiter, prefix, suffix);
     *     for (String str : strings) {
     *         result.add(str);
     *    }
     *     return result.toString();
     *
     *     Stream.of(strings).collect(Collectors.joining(delimiter, prefix, suffix))
     * </pre>
     *
     * @param delimiter 分隔符
     * @param prefix    前缀
     * @param suffix    后缀
     * @param strings   需要拼接的字串
     * @return 拼接后的字符串
     */
    public static String build(String delimiter, String prefix, String suffix, String... strings) {
        int len = prefix.length() + suffix.length() + (strings.length - 1) * delimiter.length();
        for (String str : strings) {
            len += str.length();
        }
        StringBuilder result = new StringBuilder(len);
        result.append(prefix);
        for (String str : strings) {
            result.append(str).append(delimiter);
        }
        if (result.length() > prefix.length()) {
            result.deleteCharAt(result.length() - 1);
        }
        result.append(suffix);
        return result.toString();
    }

    /**
     * 编码字符串,编码为UTF-8
     *
     * @param str 字符串
     * @return 编码后的字节数组
     */
    public static byte[] utf8Bytes(CharSequence str) {
        return bytes(str, CharsetUtils.CHARSET_UTF_8);
    }

    /**
     * 编码字符串<br>
     * 使用系统默认编码
     *
     * @param str 字符串
     * @return 编码后的字节码
     */
    public static byte[] bytes(CharSequence str) {
        return bytes(str, null);
    }

    /**
     * 编码字符串
     *
     * @param str     字符串
     * @param charset 字符集,如果此字段为空,则编码的结果取决于平台
     * @return 编码后的字节数组
     */
    public static byte[] bytes(CharSequence str, Charset charset) {
        if (str == null) {
            return ByteArrayUtils.EMPTY_BYTE_ARRAY;
        }
        if (null == charset) {
            return str.toString().getBytes();
        }
        return str.toString().getBytes(charset);
    }

//    /**
//     * 常规的格式化一个带有占位符的字符串.
//     * <p>
//     * 区别于JDK的{@link MessageFormat#format(String, Object...)},这个方法只是简单的按位填充
//     *
//     * @param messagePattern       带有占位符的字符串
//     * @param arguments 参数列表
//     * @return 格式化以后的字符串
//     */
//    public static String format(String messagePattern, Object... arguments) {
//        if (arguments.length == 0) {
//            return messagePattern;
//        }
//        // FIXME 这个方法基本用于日志,邮件内容拼接,可以参考日志中使用的方案做一个缓存策略
//        for (int i = 0, len = arguments.length; i < len; i++) {
//            messagePattern = messagePattern.replace(join("{", String.valueOf(i), "}"), String.valueOf(arguments[i]));
//        }
//        return messagePattern;
//    }

    /**
     * Replace placeholders in the given messagePattern with arguments.
     *
     * @param messagePattern the message pattern containing placeholders.
     * @param arguments      the arguments to be used to replace placeholders.
     * @return the formatted message.
     */
    public static String format(String messagePattern, Object... arguments) {
        if (messagePattern == null || arguments == null || arguments.length == 0) {
            return messagePattern;
        }
        final StringBuilder result = new StringBuilder();
        int currentArgument = 0;
        for (int i = 0; i < messagePattern.length(); i++) {
            final char curChar = messagePattern.charAt(i);
            if (curChar == DELIM_START && i < messagePattern.length() - 1 && messagePattern.charAt(i + 1) == DELIM_STOP) {
                if (currentArgument < arguments.length) {
                    result.append(arguments[currentArgument]);
                } else {
                    result.append(DELIM_START).append(DELIM_STOP);
                }
                currentArgument++;
                i++;
            } else {
                result.append(curChar);
            }
        }
        return result.toString();
    }

    /**
     * 从输入流中读出所有文本.
     *
     * @param inputStream 输入流
     * @return 返回流中的文本
     * @throws IOException If an I/O error occurs
     */
    public static String readString(InputStream inputStream) throws IOException {
        return readString(inputStream, CharsetUtils.CHARSET_UTF_8);
    }

    /**
     * 从输入流中读出所有文本.
     *
     * @param inputStream 输入流
     * @param charset     文本的编码方式
     * @return 返回流中的文本
     * @throws IOException If an I/O error occurs
     */
    public static String readString(InputStream inputStream, Charset charset) throws IOException {
        try (InputStreamReader isr = new InputStreamReader(inputStream, charset)) {
            return readString(isr);
        }
    }

    /**
     * 读出所有文本。
     * <p>
     * 这里没有选择BufferedReader就是不想一行一行的读,浪费字符串拼接性能 <br>
     * 正常用于读HTTP的响应,配置文件内容,小文件等情况
     *
     * @param reader 抽象的文本流
     * @return 返回流中所有文本
     * @throws IOException If an I/O error occurs
     */
    public static String readString(Reader reader) throws IOException {
        final StringBuilder sb = new StringBuilder(1024);
        // 申明一次读取缓冲区
        final char[] array = new char[256];
        // 这里并没有使用while(true),如果一个文本超过100W,还是放弃后面的算了
        while (sb.length() < MathUtils.MILLION) {
            int n = reader.read(array);
            // 读结束了,就GG了
            if (n < 0) {
                break;
            }
            sb.append(array, 0, n);
        }
        return sb.toString();
    }

    /**
     * 从左边使用空格(' ')补齐指定位位数的字符串.
     * <pre>
     * StringUtils.leftPad(null, *)   = null
     * StringUtils.leftPad("", 3)     = "   "
     * StringUtils.leftPad("bat", 3)  = "bat"
     * StringUtils.leftPad("bat", 5)  = "  bat"
     * StringUtils.leftPad("bat", 1)  = "bat"
     * StringUtils.leftPad("bat", -1) = "bat"
     * </pre>
     *
     * @param str  字符串
     * @param size 补齐后的位数
     * @return 返回补齐后的字符串{@code null}
     */
    public static String leftPad(final String str, final int size) {
        return leftPad(str, size, ' ');
    }

    /**
     * 从左边使用指定字符补齐指定位位数的字符串.
     *
     * <pre>
     * StringUtils.leftPad(null, *, *)     = null
     * StringUtils.leftPad("", 3, 'b')     = "bbb"
     * StringUtils.leftPad("bat", 3, 'b')  = "bat"
     * StringUtils.leftPad("bat", 5, ' ')  = "  bat"
     * StringUtils.leftPad("bat", 1, 'b')  = "bat"
     * StringUtils.leftPad("bat", -1, 'b') = "bat"
     * </pre>
     *
     * @param str     字符串
     * @param size    补齐后的位数
     * @param padChar 补齐字符
     * @return 返回补齐后的字符串{@code null}
     */
    public static String leftPad(final String str, final int size, final char padChar) {
        if (str == null) {
            return null;
        }

        // 不需要补位,那就返回原来的字符串
        final int pads = size - str.length();
        if (pads <= 0) {
            return str;
        }

        // 创建返回数组,前面填充指定字符,后面复制原来的字符串
        final char[] array = new char[size];
        Arrays.fill(array, 0, pads, padChar);
        System.arraycopy(str.toCharArray(), 0, array, pads, str.length());
        return new String(array);
    }

    private static final String FOLDER_SEPARATOR = "/";
    private static final char DELIM_START = '{';
    private static final char DELIM_STOP = '}';
    private static final int GB = 1024 * 1024 * 1024;// 定义GB的计算常量
    private static final int MB = 1024 * 1024;// 定义MB的计算常量
    private static final int KB = 1024;// 定义KB的计算常量

    public static boolean isEmpty(String... array) {
        for (String str : array) {
            if (org.apache.commons.lang3.StringUtils.isEmpty(str)) {
                return true;
            }
        }
        return false;
    }


    public static String format2Percent(double value) {
        String p = String.valueOf(value * 100D);
        int ix = p.indexOf(".") + 1;
        String percent = p.substring(0, ix) + p.substring(ix, ix + 1);
        return percent + "%";
    }

    public static String byte2GBMBKB(long value) {
        if (value / GB >= 1) // 如果当前Byte的值大于等于1GB
        {
            return String.format("%.2f", value / (float) GB) + " GB";// 将其转换成GB
        } else if (value / MB >= 1) // 如果当前Byte的值大于等于1MB
        {
            return String.format("%.2f", value / (float) MB) + " MB";// 将其转换成MB
        } else if (value / KB >= 1) // 如果当前Byte的值大于等于1KB
        {
            return String.format("%.2f", value / (float) KB) + " KB";// 将其转换成KB
        } else {
            return String.valueOf(value) + " Byte";// 显示Byte值
        }
    }

    public static String stringToAscii(String value) {
        StringBuffer ret = new StringBuffer();
        char[] chars = value.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (i != chars.length - 1) {
                ret.append((int) chars[i]);
            } else {
                ret.append((int) chars[i]);
            }
        }
        return ret.toString();
    }

    /**
     * 解析字符串中所有数字,注意:这里只是把数字字符串切割出来了,转换成数字时注意边界
     *
     * @param content 需要解析的字符串
     * @return 所有数字字符串集合
     */
    public static ArrayList<String> incisionNumber(String content) {
        ArrayList<String> ret = new ArrayList<>();
        if (org.apache.commons.lang3.StringUtils.isEmpty(content)) {
            return ret;
        }
        Matcher m = NUMBER_PATTERN.matcher(content);
        while (m.find()) {
            ret.add(m.group());
        }
        retu
Download .txt
gitextract_bng3r18m/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── gradle-publish.yml
│       └── gradle.yml
├── .gitignore
├── .settings/
│   └── .gitignore
├── LICENSE
├── README.en-US.md
├── README.md
├── _config.yml
├── build.gradle
├── docs/
│   ├── _config.yml
│   └── index.md
├── gamioo-cache/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       └── jmh/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── cache/
│                           └── CacheBenchMark.java
├── gamioo-common/
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── common/
│       │                   ├── concurrent/
│       │                   │   ├── Group.java
│       │                   │   └── NameableThreadFactory.java
│       │                   ├── constant/
│       │                   │   ├── CacheConstant.java
│       │                   │   ├── Describe.java
│       │                   │   ├── ModuleConstant.java
│       │                   │   ├── SystemConstant.java
│       │                   │   └── TimeConstant.java
│       │                   ├── exception/
│       │                   │   ├── BeansException.java
│       │                   │   ├── NestedIOException.java
│       │                   │   ├── NoPublicFieldException.java
│       │                   │   ├── NoPublicMethodException.java
│       │                   │   ├── ServerBootstrapException.java
│       │                   │   └── ServiceException.java
│       │                   ├── http/
│       │                   │   └── RequestMethod.java
│       │                   ├── lang/
│       │                   │   ├── Cache.java
│       │                   │   ├── Server.java
│       │                   │   └── ServerInfo.java
│       │                   ├── shape/
│       │                   │   ├── AABB.java
│       │                   │   ├── Point.java
│       │                   │   ├── Sector.java
│       │                   │   └── Shape.java
│       │                   ├── util/
│       │                   │   ├── AnnotationUtils.java
│       │                   │   ├── ArrayUtils.java
│       │                   │   ├── Assert.java
│       │                   │   ├── ByteArrayUtils.java
│       │                   │   ├── CharsetUtils.java
│       │                   │   ├── ClassUtils.java
│       │                   │   ├── FieldUtils.java
│       │                   │   ├── FileUtils.java
│       │                   │   ├── JSONUtils.java
│       │                   │   ├── JVMUtil.java
│       │                   │   ├── JsonXmlUtil.java
│       │                   │   ├── MathUtils.java
│       │                   │   ├── MethodUtils.java
│       │                   │   ├── NativeUtils.java
│       │                   │   ├── RandomUtils.java
│       │                   │   ├── ResourceUtils.java
│       │                   │   ├── StringUtils.java
│       │                   │   ├── TelnetUtils.java
│       │                   │   ├── ThreadUtils.java
│       │                   │   └── XMLUtil.java
│       │                   └── vector/
│       │                       ├── Vector2f.java
│       │                       └── Vector3f.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           ├── JsonXmlUtilTest.java
│           │           └── MainT.java
│           └── resources/
│               ├── gate-config.xml
│               ├── junit-platform.properties
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-compress/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── compress/
│       │   │               ├── CompressBenchMark.java
│       │   │               └── SimilarityBenchMark.java
│       │   └── resources/
│       │       ├── message.txt
│       │       ├── mini.txt
│       │       ├── readu.txt
│       │       └── short.txt
│       └── main/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── compress/
│           │               ├── Main.java
│           │               └── ZlibUtil.java
│           └── resources/
│               └── message.txt
├── gamioo-config/
│   ├── build.gradle
│   └── src/
│       └── main/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── config/
│                           ├── NacosUtil.java
│                           ├── ServerConfig.java
│                           └── ServerConfigManager.java
├── gamioo-event/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── event/
│       │                   ├── EventService.java
│       │                   └── package-info.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── event/
│           │               └── guava/
│           │                   ├── BaseEvent.java
│           │                   ├── MainT.java
│           │                   ├── StageEventHandler.java
│           │                   ├── UserEventHandler.java
│           │                   └── UserLoginEvent.java
│           └── resources/
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-game/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── game/
│       │                   ├── Main.java
│       │                   ├── activity/
│       │                   │   └── package-info.java
│       │                   └── word/
│       │                       ├── DirtyWordUnit.java
│       │                       ├── DirtyWordsReader.java
│       │                       └── DirtyWordsValidator.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── game/
│           │               ├── BalanceBusinessExecutorTest.java
│           │               └── DeviationDTO.java
│           └── resources/
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-ioc/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── ioc/
│       │                   ├── PropertyValue.java
│       │                   ├── PropertyValues.java
│       │                   ├── annotation/
│       │                   │   ├── AnnotationAttributes.java
│       │                   │   ├── AnnotationBeanDefinitionReader.java
│       │                   │   ├── Attribute.java
│       │                   │   ├── Bean.java
│       │                   │   ├── CommandMapping.java
│       │                   │   ├── Configuration.java
│       │                   │   ├── DefaultResourceLoader.java
│       │                   │   ├── Mapping.java
│       │                   │   ├── RequestMapping.java
│       │                   │   ├── Scheduled.java
│       │                   │   ├── Subscribe.java
│       │                   │   └── Value.java
│       │                   ├── config/
│       │                   │   ├── BeanFactoryPostProcessor.java
│       │                   │   ├── BeanPostProcessor.java
│       │                   │   └── BeanReference.java
│       │                   ├── context/
│       │                   │   ├── ApplicationContext.java
│       │                   │   ├── ClassPathBeanDefinitionScanner.java
│       │                   │   └── ConfigApplicationContext.java
│       │                   ├── definition/
│       │                   │   ├── BeanDefinition.java
│       │                   │   ├── ConfigurationBeanDefinition.java
│       │                   │   ├── ControllerBeanDefinition.java
│       │                   │   ├── Definition.java
│       │                   │   ├── FieldDefinition.java
│       │                   │   ├── GenericBeanDefinition.java
│       │                   │   ├── GenericFieldDefinition.java
│       │                   │   ├── GenericMethodDefinition.java
│       │                   │   ├── ListFieldDefinition.java
│       │                   │   ├── MapFieldDefinition.java
│       │                   │   ├── MethodDefinition.java
│       │                   │   └── ResourceBeanDefinition.java
│       │                   ├── factory/
│       │                   │   ├── BeanFactory.java
│       │                   │   ├── ObjectFactory.java
│       │                   │   ├── annotation/
│       │                   │   │   └── Autowired.java
│       │                   │   ├── support/
│       │                   │   │   ├── AbstractAutowireCapableBeanFactory.java
│       │                   │   │   ├── AbstractBeanDefinition.java
│       │                   │   │   ├── AbstractBeanDefinitionReader.java
│       │                   │   │   ├── AbstractBeanFactory.java
│       │                   │   │   ├── BeanDefinitionReader.java
│       │                   │   │   └── DefaultListableBeanFactory.java
│       │                   │   └── xml/
│       │                   │       ├── XmlBeanDefinitionReader.java
│       │                   │       └── XmlResourceLoader.java
│       │                   ├── io/
│       │                   │   ├── AbstractResource.java
│       │                   │   ├── FileClassResource.java
│       │                   │   ├── JarClassResource.java
│       │                   │   ├── Resource.java
│       │                   │   ├── ResourceCallback.java
│       │                   │   ├── ResourceLoader.java
│       │                   │   └── UrlFileResource.java
│       │                   ├── stereotype/
│       │                   │   ├── Component.java
│       │                   │   ├── Controller.java
│       │                   │   ├── Repository.java
│       │                   │   ├── Resource.java
│       │                   │   ├── Service.java
│       │                   │   └── package-info.java
│       │                   ├── type/
│       │                   │   ├── AnnotatedTypeMetadata.java
│       │                   │   ├── AnnotationMetadata.java
│       │                   │   ├── ClassMetadata.java
│       │                   │   ├── MethodMetadata.java
│       │                   │   └── classreading/
│       │                   │       ├── AnnotationMetadataReadingVisitor.java
│       │                   │       ├── ClassMetadataReadingVisitor.java
│       │                   │       └── MetadataReader.java
│       │                   └── wrapper/
│       │                       ├── BeanWrapper.java
│       │                       ├── Command.java
│       │                       └── MethodWrapper.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── ioc/
│           │               ├── DebugService.java
│           │               ├── IOCFactoryTest.java
│           │               ├── MapTest.java
│           │               ├── RoleService.java
│           │               ├── SkillService.java
│           │               ├── XmlBeanFactoryTest.java
│           │               ├── action/
│           │               │   └── UserController.java
│           │               ├── entity/
│           │               │   ├── Cache.java
│           │               │   ├── DB.java
│           │               │   ├── Server.java
│           │               │   └── ServerConfig.java
│           │               ├── map/
│           │               │   ├── AddItemCommand.java
│           │               │   ├── AddMoneyCommand.java
│           │               │   ├── AddRmbCommand.java
│           │               │   └── Command.java
│           │               └── skill/
│           │                   ├── AbstractSkill.java
│           │                   ├── SkillA.java
│           │                   └── SkillB.java
│           └── resources/
│               ├── gate-config.xml
│               ├── ioc.xml
│               ├── junit-platform.properties
│               ├── log4j2.component.properties
│               └── log4j2.xml
├── gamioo-log/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── log/
│       │   │               ├── MainT.java
│       │   │               └── package-info.java
│       │   └── resources/
│       │       ├── log4j2.component.properties
│       │       └── log4j2.xml
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── log/
│           │               └── Main.java
│           └── resources/
│               └── log4j2.xml
├── gamioo-navigation/
│   ├── README.md
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── nav/
│       │                   └── NavEngineBenchMark.java
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── nav/
│       │                   ├── Easy3dNav.java
│       │                   ├── INav.java
│       │                   ├── Main.java
│       │                   └── NavEngine.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── nav/
│                           └── NavEngineTest.java
├── gamioo-network/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── network/
│       │                   ├── package-info.java
│       │                   └── util/
│       │                       └── IPUtil.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── network/
│                           └── MainT.java
├── gamioo-orm/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── orm/
│       │                   ├── OrmService.java
│       │                   └── package-info.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── orm/
│                           └── MainT.java
├── gamioo-protocol/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── protocol/
│       │                   ├── ProtocolService.java
│       │                   └── package-info.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── protocol/
│                           └── MainT.java
├── gamioo-redis/
│   ├── .settings/
│   │   └── .gitignore
│   ├── build.gradle
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── redis/
│       │                   ├── Redis.java
│       │                   ├── RedisConstant.java
│       │                   └── zset/
│       │                       ├── ZSetUtils.java
│       │                       ├── generic/
│       │                       │   ├── Entry.java
│       │                       │   ├── GenericZSet.java
│       │                       │   ├── ScoreHandler.java
│       │                       │   ├── ScoreHandlers.java
│       │                       │   ├── ScoreRangeSpec.java
│       │                       │   └── ZScoreRangeSpec.java
│       │                       ├── long2object/
│       │                       │   ├── Long2ObjectEntry.java
│       │                       │   └── Long2ObjectZSet.java
│       │                       └── object2long/
│       │                           ├── LongScoreHandler.java
│       │                           ├── LongScoreHandlers.java
│       │                           ├── LongScoreRangeSpec.java
│       │                           ├── Object2LongEntry.java
│       │                           ├── Object2LongZSet.java
│       │                           └── ZLongScoreRangeSpec.java
│       └── test/
│           └── java/
│               └── io/
│                   └── gamioo/
│                       └── redis/
│                           └── zset/
│                               ├── generic/
│                               │   └── GenericZSetTest.java
│                               ├── long2object/
│                               │   └── Long2ObjectZSetTest.java
│                               └── object2long/
│                                   └── Object2LongZSetTest.java
├── gamioo-sandbox/
│   ├── build.gradle
│   └── src/
│       ├── jmh/
│       │   ├── java/
│       │   │   └── io/
│       │   │       └── gamioo/
│       │   │           └── sandbox/
│       │   │               ├── AsymmetricBenchMark.java
│       │   │               ├── InterruptBenchmark.java
│       │   │               ├── MapBenchMark.java
│       │   │               ├── ProtoDeserializeBenchMark.java
│       │   │               ├── ProtoSerializeBenchMark.java
│       │   │               └── SymmetricBenchmark.java
│       │   └── resources/
│       │       └── message.txt
│       ├── main/
│       │   └── java/
│       │       └── io/
│       │           └── gamioo/
│       │               └── sandbox/
│       │                   ├── HarmDTO.java
│       │                   ├── LoginGame_S2C_Msg.java
│       │                   ├── SerializingUtil.java
│       │                   ├── SkillCategory.java
│       │                   └── SkillFire_S2C_Msg.java
│       └── test/
│           ├── java/
│           │   └── io/
│           │       └── gamioo/
│           │           └── sandbox/
│           │               ├── AnsibleTest.java
│           │               ├── Base64Test.java
│           │               ├── BitMapTest.java
│           │               ├── CryptoTest.java
│           │               └── ProtoTest.java
│           └── resources/
│               └── message.txt
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── version.properties
Download .txt
SYMBOL INDEX (1632 symbols across 182 files)

FILE: gamioo-cache/src/jmh/java/io/gamioo/cache/CacheBenchMark.java
  class CacheBenchMark (line 20) | @State(Scope.Group)
    method init (line 36) | @Setup(Level.Trial)
    method destroy (line 51) | @TearDown(Level.Trial)
    method prepare (line 57) | @Group("cache")
    method put (line 65) | @Benchmark
    method get (line 77) | @Benchmark
    method main (line 91) | public static void main(String[] args) {

FILE: gamioo-common/src/main/java/io/gamioo/common/concurrent/Group.java
  type Group (line 28) | public enum Group {

FILE: gamioo-common/src/main/java/io/gamioo/common/concurrent/NameableThreadFactory.java
  class NameableThreadFactory (line 12) | public class NameableThreadFactory implements ThreadFactory {
    method newThread (line 16) | @Override
    method NameableThreadFactory (line 26) | public NameableThreadFactory(String name) {

FILE: gamioo-common/src/main/java/io/gamioo/common/constant/CacheConstant.java
  class CacheConstant (line 6) | public class CacheConstant {

FILE: gamioo-common/src/main/java/io/gamioo/common/constant/ModuleConstant.java
  class ModuleConstant (line 12) | public class ModuleConstant {
    method getModuleList (line 30) | public static List<String> getModuleList() {

FILE: gamioo-common/src/main/java/io/gamioo/common/constant/SystemConstant.java
  class SystemConstant (line 6) | public class SystemConstant {
    method getServerType (line 97) | public static int getServerType(String type) {

FILE: gamioo-common/src/main/java/io/gamioo/common/constant/TimeConstant.java
  class TimeConstant (line 5) | public class TimeConstant {
    method main (line 20) | public static void main(String[] args) {

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/BeansException.java
  class BeansException (line 25) | public abstract class BeansException extends ServiceException {

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NestedIOException.java
  class NestedIOException (line 27) | public class NestedIOException extends IOException {
    method NestedIOException (line 34) | public NestedIOException(String msg) {
    method NestedIOException (line 45) | public NestedIOException(String msg, Throwable cause) {
    method getMessage (line 54) | @Override

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicFieldException.java
  class NoPublicFieldException (line 9) | public class NoPublicFieldException extends ServiceException {
    method NoPublicFieldException (line 12) | public NoPublicFieldException(String message,Object... params) {
    method NoPublicFieldException (line 16) | public NoPublicFieldException(String message, Throwable cause) {
    method NoPublicFieldException (line 21) | public NoPublicFieldException(Throwable cause, String message, Object....

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicMethodException.java
  class NoPublicMethodException (line 24) | public class NoPublicMethodException extends RuntimeException {
    method NoPublicMethodException (line 27) | public NoPublicMethodException(String msg) {

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/ServerBootstrapException.java
  class ServerBootstrapException (line 25) | public class ServerBootstrapException extends ServiceException{
    method ServerBootstrapException (line 28) | public ServerBootstrapException(String message,Object... params) {
    method ServerBootstrapException (line 32) | public ServerBootstrapException(String message, Throwable cause) {
    method ServerBootstrapException (line 36) | public ServerBootstrapException(Throwable cause, String message, Objec...

FILE: gamioo-common/src/main/java/io/gamioo/common/exception/ServiceException.java
  class ServiceException (line 11) | public class ServiceException extends RuntimeException {
    method ServiceException (line 19) | public ServiceException() {
    method ServiceException (line 22) | public ServiceException(int code) {
    method ServiceException (line 26) | public ServiceException(Throwable cause,String message,Object... params){
    method ServiceException (line 30) | public ServiceException(String message) {
    method ServiceException (line 33) | public ServiceException(String message,Object... params){
    method ServiceException (line 37) | public ServiceException(String message, Throwable cause) {
    method ServiceException (line 41) | public ServiceException(Throwable cause) {

FILE: gamioo-common/src/main/java/io/gamioo/common/http/RequestMethod.java
  type RequestMethod (line 25) | public enum RequestMethod {

FILE: gamioo-common/src/main/java/io/gamioo/common/lang/Cache.java
  class Cache (line 12) | public class Cache {
    method Cache (line 19) | public Cache(){
    method Cache (line 22) | public Cache(int type, String ip, int port, int index, String password) {
    method getType (line 30) | public int getType() {
    method setType (line 34) | public void setType(int type) {
    method getIp (line 38) | public String getIp() {
    method setIp (line 42) | public void setIp(String ip) {
    method getPort (line 46) | public int getPort() {
    method setPort (line 50) | public void setPort(int port) {
    method getIndex (line 54) | public int getIndex() {
    method setIndex (line 58) | public void setIndex(int index) {
    method getPassword (line 62) | public String getPassword() {
    method setPassword (line 66) | public void setPassword(String password) {
    method toString (line 70) | @Override

FILE: gamioo-common/src/main/java/io/gamioo/common/lang/Server.java
  class Server (line 8) | public class Server {
    method Server (line 25) | public Server() {
    method getType (line 30) | public String getType() {
    method getArgs (line 34) | public String getArgs() {
    method setArgs (line 38) | public void setArgs(String args) {
    method setType (line 42) | public void setType(String type) {
    method getStartTime (line 46) | public Date getStartTime() {
    method setStartTime (line 50) | public void setStartTime(Date startTime) {
    method getServerVersion (line 54) | public String getServerVersion() {
    method setServerVersion (line 58) | public void setServerVersion(String serverVersion) {
    method getDataVersion (line 66) | public String getDataVersion() {
    method setDataVersion (line 70) | public void setDataVersion(String dataVersion) {
    method getWebPort (line 75) | public int getWebPort() {
    method setWebPort (line 79) | public void setWebPort(int webPort) {
    method getTcpPort (line 83) | public int getTcpPort() {
    method setTcpPort (line 87) | public void setTcpPort(int tcpPort) {
    method getName (line 91) | public String getName() {
    method setName (line 95) | public void setName(String name) {
    method getId (line 99) | public int getId() {
    method setId (line 103) | public void setId(int id) {
    method getInnerPort (line 107) | public int getInnerPort() {
    method setInnerPort (line 111) | public void setInnerPort(int innerPort) {
    method getInnerIp (line 115) | public String getInnerIp() {
    method setInnerIp (line 119) | public void setInnerIp(String innerIp) {
    method getExternalIp (line 123) | public String getExternalIp() {
    method setExternalIp (line 127) | public void setExternalIp(String externalIp) {
    method getStatus (line 131) | public int getStatus() {
    method setStatus (line 135) | public void setStatus(int status) {
    method toString (line 139) | public String toString() {

FILE: gamioo-common/src/main/java/io/gamioo/common/lang/ServerInfo.java
  class ServerInfo (line 8) | public class ServerInfo {
    method getId (line 14) | public int getId() {
    method setId (line 18) | public void setId(int id) {
    method getName (line 22) | public String getName() {
    method setName (line 26) | public void setName(String name) {
    method getTimes (line 30) | public int getTimes() {
    method setTimes (line 34) | public void setTimes(int times) {
    method getAddTime (line 38) | public Date getAddTime() {
    method setAddTime (line 42) | public void setAddTime(Date addTime) {
    method toString (line 46) | @Override

FILE: gamioo-common/src/main/java/io/gamioo/common/shape/AABB.java
  class AABB (line 6) | public class AABB implements Shape {
    method AABB (line 13) | public AABB(int left, int top, int right, int bottom) {
    method getLeft (line 21) | public int getLeft() {
    method getTop (line 25) | public int getTop() {
    method getRight (line 29) | public int getRight() {
    method getBottom (line 33) | public int getBottom() {
    method getCenterX (line 37) | public int getCenterX() {
    method getCenterY (line 41) | public int getCenterY() {
    method getWidth (line 45) | public int getWidth() {
    method getHeight (line 49) | public int getHeight() {
    method toString (line 54) | @Override
    method containsPoint (line 64) | @Override
    method getAABB (line 69) | @Override
    method getRandomPoint (line 74) | @Override

FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Point.java
  class Point (line 6) | public class Point implements Shape {
    method valueOf (line 12) | public static Point valueOf(int x, int y) {
    method valueOf (line 16) | public static Point valueOf(float x, float y) {
    method Point (line 20) | private Point(int x, int y) {
    method getX (line 25) | public int getX() {
    method getY (line 29) | public int getY() {
    method calDisBetweenTwoPoint (line 39) | public static double calDisBetweenTwoPoint(Point a, Point b) {
    method rotate (line 51) | public Point rotate(Point point, double radians) {
    method lerpPoint (line 67) | public static Point lerpPoint(Point a, Point b, float t) {
    method getPointWithDisToEndPoint (line 82) | public static Point getPointWithDisToEndPoint(Point a, Point b, int di...
    method getPointWithDisToSrcPoint (line 102) | public static Point getPointWithDisToSrcPoint(Point a, Point b, float ...
    method getPointWithVectorAndDis (line 120) | public Point getPointWithVectorAndDis(Vector2f vector, float dis) {
    method containsPoint (line 131) | @Override
    method getAABB (line 136) | @Override
    method getRandomPoint (line 144) | @Override
    method equals (line 149) | @Override
    method roughlyEquals (line 167) | public boolean roughlyEquals(Point point, final int accuracyErrorSize) {
    method toString (line 174) | @Override

FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Sector.java
  class Sector (line 15) | public class Sector implements Shape {
    method valueOf (line 34) | public static Sector valueOf(Point one, Point other, int radius, int a...
    method Sector (line 38) | private Sector(Point one, Point other, int radius, int angle) {
    method containsPoint (line 52) | @Override
    method pointWithinRadius (line 63) | public boolean pointWithinRadius(long x, long y) {
    method containsPoint (line 68) | public boolean containsPoint(Point point) {
    method getAABB (line 73) | @Override
    method getRandomPoint (line 124) | @Override
    method getCenter (line 137) | public Point getCenter() {
    method setCenter (line 141) | public void setCenter(Point center) {
    method getPointA (line 145) | public Point getPointA() {
    method setPointA (line 149) | public void setPointA(Point pointA) {
    method getPointB (line 153) | public Point getPointB() {
    method setPointB (line 157) | public void setPointB(Point pointB) {
    method getR (line 161) | public int getR() {
    method getStartAngle (line 165) | public double getStartAngle() {
    method getEndAngle (line 169) | public double getEndAngle() {
    method angleContainPoint (line 180) | public boolean angleContainPoint(long x, long y) {

FILE: gamioo-common/src/main/java/io/gamioo/common/shape/Shape.java
  type Shape (line 4) | public interface Shape {
    method containsPoint (line 13) | boolean containsPoint(long x, long y);
    method getAABB (line 20) | AABB getAABB();
    method getRandomPoint (line 27) | Point getRandomPoint();

FILE: gamioo-common/src/main/java/io/gamioo/common/util/AnnotationUtils.java
  class AnnotationUtils (line 29) | public class AnnotationUtils {
    method AnnotationUtils (line 30) | private AnnotationUtils() {
    method getAnnotation (line 41) | public static <A extends Annotation> Annotation getAnnotation(Annotate...

FILE: gamioo-common/src/main/java/io/gamioo/common/util/ArrayUtils.java
  class ArrayUtils (line 26) | public class ArrayUtils {
    method addAll (line 50) | public static long[] addAll(final long[] array1, final long... array2) {
    method isEmpty (line 63) | public static boolean isEmpty(final Object[] array) {
    method isNotEmpty (line 73) | public static boolean isNotEmpty(final Object[] array) {
    method isEmpty (line 83) | public static boolean isEmpty(final byte[] array) {
    method isNotEmpty (line 93) | public static boolean isNotEmpty(final byte[] array) {
    method isEmpty (line 103) | public static boolean isEmpty(final boolean[] array) {
    method isNotEmpty (line 113) | public static boolean isNotEmpty(final boolean[] array) {
    method isEmpty (line 123) | public static boolean isEmpty(final int[] array) {
    method isNotEmpty (line 133) | public static boolean isNotEmpty(final int[] array) {
    method isEmpty (line 143) | public static boolean isEmpty(final long[] array) {
    method isNotEmpty (line 153) | public static boolean isNotEmpty(final long[] array) {
    method isEmpty (line 163) | public static boolean isEmpty(final float[] array) {
    method isNotEmpty (line 173) | public static boolean isNotEmpty(final float[] array) {
    method isEmpty (line 183) | public static boolean isEmpty(final double[] array) {
    method isNotEmpty (line 193) | public static boolean isNotEmpty(final double[] array) {
    method toIntArray (line 203) | public static int[] toIntArray(String[] array) {
    method toIntArray (line 213) | public static int[] toIntArray(Integer[] array) {
    method toLongArray (line 223) | public static long[] toLongArray(String[] array) {
    method toLongArray (line 233) | public static long[] toLongArray(Long[] array) {
    method toByteArray (line 245) | public static byte[] toByteArray(String[] array) {
    method toByteArray (line 256) | public static byte[] toByteArray(String[] array, int radix) {
    method length (line 272) | public static int length(String[] array) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/Assert.java
  class Assert (line 30) | public class Assert {
    method isTrue (line 42) | public static void isTrue(boolean expression, String message) {
    method isTrue (line 56) | public static void isTrue(boolean expression) {
    method isNull (line 68) | public static void isNull(Object object, String message) {
    method isNull (line 81) | public static void isNull(Object object) {
    method notNull (line 93) | public static void notNull(Object object, String message) {
    method notNull (line 106) | public static void notNull(Object object) {
    method hasLength (line 120) | public static void hasLength(String text, String message) {
    method hasLength (line 135) | public static void hasLength(String text) {
    method hasText (line 150) | public static void hasText(String text, String message) {
    method hasText (line 165) | public static void hasText(String text) {
    method doesNotContain (line 179) | public static void doesNotContain(String textToSearch, String substrin...
    method doesNotContain (line 194) | public static void doesNotContain(String textToSearch, String substrin...
    method notEmpty (line 208) | public static void notEmpty(Object[] array, String message) {
    method notEmpty (line 222) | public static void notEmpty(Object[] array) {
    method noNullElements (line 235) | public static void noNullElements(Object[] array, String message) {
    method noNullElements (line 253) | public static void noNullElements(Object[] array) {
    method notEmpty (line 266) | public static void notEmpty(Collection<?> collection, String message) {
    method notEmpty (line 280) | public static void notEmpty(Collection<?> collection) {
    method notEmpty (line 294) | public static void notEmpty(Map<?, ?> map, String message) {
    method notEmpty (line 309) | public static void notEmpty(Map<?, ?> map) {
    method isInstanceOf (line 322) | public static void isInstanceOf(Class<?> clazz, Object obj) {
    method isInstanceOf (line 339) | public static void isInstanceOf(Class<?> type, Object obj, String mess...
    method isAssignable (line 357) | public static void isAssignable(Class<?> superType, Class<?> subType) {
    method isAssignable (line 373) | public static void isAssignable(Class<?> superType, Class<?> subType, ...
    method state (line 391) | public static void state(boolean expression, String message) {
    method state (line 407) | public static void state(boolean expression) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/ByteArrayUtils.java
  class ByteArrayUtils (line 25) | public class ByteArrayUtils {
    method toByteArray (line 37) | public static byte[] toByteArray(short a) {
    method toByteArray (line 47) | public static byte[] toByteArray(int num) {
    method toInt (line 57) | public static int toInt(byte[] bytes) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/CharsetUtils.java
  class CharsetUtils (line 27) | public class CharsetUtils {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/ClassUtils.java
  class ClassUtils (line 25) | public class ClassUtils {
    method getDefaultClassLoader (line 40) | public static ClassLoader getDefaultClassLoader() {
    method loadClass (line 69) | public static Class<?> loadClass(String className) {
    method newInstance (line 92) | public static <T> T newInstance(final Class<T> klass) {
    method newInstance (line 108) | @SuppressWarnings("unchecked")

FILE: gamioo-common/src/main/java/io/gamioo/common/util/FieldUtils.java
  class FieldUtils (line 19) | public class FieldUtils {
    method writeField (line 32) | public static void writeField(final Object target, final Field field, ...
    method writeField (line 52) | public static void writeField(final Object target, final String fieldN...
    method readField (line 67) | public static Object readField(final Object target, final Field field) {
    method getField (line 86) | public static Field getField(final Class<?> klass, String fieldName) {
    method getFieldList (line 105) | public static List<Field> getFieldList(final Class<?> klass) {
    method genGetMethodName (line 120) | public static String genGetMethodName(Field field) {
    method genSetMethodName (line 145) | public static String genSetMethodName(Field field) {
    method scanAllField (line 162) | public static Field[] scanAllField(final Class<?> klass, List<Class<? ...
    method scanField (line 176) | private static void scanField(final Class<?> klass, Map<String, Field>...
    method getMapFieldKeyClass (line 208) | public static Class<?> getMapFieldKeyClass(Field field) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/FileUtils.java
  class FileUtils (line 21) | public class FileUtils {
    method getFileText (line 35) | public static Optional<String> getFileText(String fileName) {
    method readFileText (line 54) | public static String readFileText(String fileName) throws FileNotFound...
    method getFile (line 67) | public static File getFile(String fileName) {
    method getFileFromJar (line 86) | public static File getFileFromJar(String fileName) {
    method getInputStream (line 103) | public static InputStream getInputStream(String fileName) {
    method getInputStreamFromAll (line 108) | public static InputStream getInputStreamFromAll(String fileName) throw...
    method writeFileText (line 132) | public static void writeFileText(String fileName, String content) thro...
    method writeFileText (line 146) | public static void writeFileText(String fileName, boolean append, Stri...
    method readableFileSize (line 159) | public static String readableFileSize(File file) {
    method readableFileSize (line 169) | public static String readableFileSize(long size) {
    method createNewFile (line 186) | public static boolean createNewFile(File file) throws IOException {
    method readLines (line 202) | public static List<String> readLines(final File file) throws IOExcepti...
    method readLines (line 216) | public static List<String> readLines(final File file, final Charset ch...
    method openInputStream (line 242) | public static FileInputStream openInputStream(final File file) throws ...
    method readFileToString (line 265) | public static String readFileToString(final File file) throws IOExcept...
    method readFileToString (line 279) | public static String readFileToString(final File file, final Charset c...
    method readFileToByteArray (line 296) | public static byte[] readFileToByteArray(final File file) throws IOExc...
    method readFileToString (line 313) | public static String readFileToString(final File file, final String ch...
    method getStringFromJar (line 325) | public static String getStringFromJar(String fileName) throws IOExcept...
    method getByteArrayFromJar (line 343) | public static byte[] getByteArrayFromJar(String fileName) throws IOExc...
    method getByteArrayFromFile (line 364) | public static byte[] getByteArrayFromFile(String fileName) throws IOEx...

FILE: gamioo-common/src/main/java/io/gamioo/common/util/JSONUtils.java
  class JSONUtils (line 14) | public class JSONUtils {
    method loadFromXMLFile (line 16) | public static JSONObject loadFromXMLFile(String fileName) throws Servi...

FILE: gamioo-common/src/main/java/io/gamioo/common/util/JVMUtil.java
  class JVMUtil (line 9) | public class JVMUtil {
    method getStartArgs (line 11) | public static String getStartArgs() {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/JsonXmlUtil.java
  class JsonXmlUtil (line 32) | public class JsonXmlUtil {
    method xml2Json (line 92) | public static void xml2Json(Element element, JSONObject json) {
    method isEmpty (line 128) | public static boolean isEmpty(String str) {
    method mapToXml (line 143) | public static String mapToXml(Map<String, Object> store) {
    method xmlToMap (line 183) | public static Map<String, String> xmlToMap(String strXML) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/MathUtils.java
  class MathUtils (line 33) | public class MathUtils {
    method addExact (line 65) | public static int addExact(int x, int y) {
    method addExact (line 83) | public static long addExact(long x, long y) {
    method multiplyExact (line 101) | public static int multiplyExact(int x, int y) {
    method multiplyExact (line 119) | public static long multiplyExact(long x, long y) {
    method distance (line 138) | public static double distance(int x1, int y1, int x2, int y2) {
    method distance (line 155) | public static double distance(double x1, double y1, double x2, double ...
    method distance (line 170) | public static double distance(Point p1, Point p2) {
    method adjacent (line 185) | public static boolean adjacent(int x1, int y1, int x2, int y2) {
    method adjacent (line 198) | public static boolean adjacent(Point p1, Point p2) {
    method floorInt (line 208) | public static int floorInt(double a) {
    method floorLong (line 218) | public static long floorLong(double a) {
    method ceilInt (line 228) | public static int ceilInt(double a) {
    method ceilLong (line 238) | public static long ceilLong(double a) {
    method roundInt (line 248) | public static int roundInt(double a) {
    method min (line 253) | public static int min(List<Integer> array) {
    method min (line 264) | public static int min(int... array) {
    method max (line 274) | public static int max(int... array) {
    method max (line 284) | public static int max(List<Integer> array) {
    method roundLong (line 300) | public static long roundLong(double a) {
    method formatScale (line 314) | public static float formatScale(float value, int newScale) {
    method formatScale (line 328) | public static float formatScale(float value, int newScale, RoundingMod...
    method formatScale (line 342) | public static double formatScale(double value, int newScale) {
    method formatScale (line 356) | public static double formatScale(double value, int newScale, RoundingM...
    method plunder (line 372) | public static <T> Map<T, Long> plunder(Map<T, Long> resources, long ma...
    method longToDouble (line 429) | public static double longToDouble(long value, double ratio) {
    method permillage (line 441) | public static double permillage(long value) {
    method percentage (line 453) | public static double percentage(long value) {
    method prettyPercentage (line 461) | public static String prettyPercentage(double value){

FILE: gamioo-common/src/main/java/io/gamioo/common/util/MethodUtils.java
  class MethodUtils (line 34) | public class MethodUtils {
    method invoke (line 44) | public static Object invoke(final Object target, final Method method, ...
    method getMethodList (line 61) | public static List<Method> getMethodList(final Class<?> klass) {
    method getMethod (line 79) | public static Method getMethod(Class<?> klass, String name, Class<?>.....
    method existSetMethod (line 93) | public static boolean existSetMethod(Class<?> klass) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/NativeUtils.java
  class NativeUtils (line 11) | public class NativeUtils {
    method loadLibrary (line 12) | public static void loadLibrary(String name) throws IOException {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/RandomUtils.java
  class RandomUtils (line 34) | public class RandomUtils {
    method RandomUtils (line 36) | private RandomUtils() {
    method nextBoolean (line 44) | public static boolean nextBoolean() {
    method nextInt (line 56) | public static int nextInt(int bound) {
    method nextInt (line 69) | public static int nextInt(int origin, int bound) {
    method nextLong (line 81) | public static long nextLong(long bound) {
    method nextLong (line 94) | public static long nextLong(long origin, long bound) {
    method nextDouble (line 103) | public static double nextDouble() {
    method isSuccess (line 118) | public static boolean isSuccess(float rate) {
    method isSuccess (line 133) | public static boolean isSuccess(double rate) {
    method isSuccessByPercentage (line 149) | public static boolean isSuccessByPercentage(long rate) {
    method isSuccessByPermillage (line 165) | public static boolean isSuccessByPermillage(long rate) {
    method randomList (line 178) | public static <T> T randomList(List<T> list) {
    method randomList (line 199) | @SuppressWarnings("unchecked")
    method randomByWeight (line 234) | public static <K> K randomByWeight(Map<K, Integer> data) {
    method randomByWeight (line 261) | public static <T> T randomByWeight(List<T> data, ToIntFunction<? super...
    method randomByWeight (line 289) | public static <T> List<T> randomByWeight(List<T> data, ToIntFunction<?...
    method randomBetween (line 323) | public static int randomBetween(int min, int max) {
    method trigger (line 336) | public static boolean trigger(int numerator, int denominator) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/ResourceUtils.java
  class ResourceUtils (line 31) | public class ResourceUtils {
    method isUrl (line 79) | public static boolean isUrl(String resourceLocation) {
    method getURL (line 104) | public static URL getURL(String resourceLocation) throws FileNotFoundE...
    method getFile (line 144) | public static File getFile(String resourceLocation) throws FileNotFoun...
    method getFile (line 175) | public static File getFile(URL resourceUrl) throws FileNotFoundExcepti...
    method getFile (line 189) | public static File getFile(URL resourceUrl, String description) throws...
    method getFile (line 213) | public static File getFile(URI resourceUri) throws FileNotFoundExcepti...
    method getFile (line 227) | public static File getFile(URI resourceUri, String description) throws...
    method isFileURL (line 243) | public static boolean isFileURL(URL url) {
    method isJarURL (line 255) | public static boolean isJarURL(URL url) {
    method isJarFileURL (line 268) | public static boolean isJarFileURL(URL url) {
    method extractJarFileURL (line 280) | public static URL extractJarFileURL(URL jarUrl) throws MalformedURLExc...
    method toURI (line 312) | public static URI toURI(URL url) throws URISyntaxException {
    method toURI (line 323) | public static URI toURI(String location) throws URISyntaxException {
    method useCachesIfNecessary (line 333) | public static void useCachesIfNecessary(URLConnection con) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/StringUtils.java
  class StringUtils (line 37) | public class StringUtils {
    method isEmpty (line 115) | public static boolean isEmpty(final String text) {
    method isNotEmpty (line 133) | public static boolean isNotEmpty(final String text) {
    method isBlank (line 153) | public static boolean isBlank(final String text) {
    method isNotBlank (line 182) | public static boolean isNotBlank(final String text) {
    method length (line 194) | public static int length(final String text) {
    method split (line 232) | public static String[] split(final String str, final String separatorC...
    method splitWorker (line 245) | private static String[] splitWorker(final String str, final String sep...
    method lowerWord (line 335) | public static String lowerWord(CharSequence cs, char c) {
    method asciiSizeInBytes (line 360) | public static int asciiSizeInBytes(long v) {
    method join (line 403) | public static String join(String... strings) {
    method pathJoin (line 421) | public static String pathJoin(String... paths) {
    method build (line 457) | public static String build(String delimiter, String prefix, String suf...
    method utf8Bytes (line 480) | public static byte[] utf8Bytes(CharSequence str) {
    method bytes (line 491) | public static byte[] bytes(CharSequence str) {
    method bytes (line 502) | public static byte[] bytes(CharSequence str, Charset charset) {
    method format (line 539) | public static String format(String messagePattern, Object... arguments) {
    method readString (line 569) | public static String readString(InputStream inputStream) throws IOExce...
    method readString (line 581) | public static String readString(InputStream inputStream, Charset chars...
    method readString (line 597) | public static String readString(Reader reader) throws IOException {
    method leftPad (line 628) | public static String leftPad(final String str, final int size) {
    method leftPad (line 649) | public static String leftPad(final String str, final int size, final c...
    method isEmpty (line 674) | public static boolean isEmpty(String... array) {
    method format2Percent (line 684) | public static String format2Percent(double value) {
    method byte2GBMBKB (line 691) | public static String byte2GBMBKB(long value) {
    method stringToAscii (line 706) | public static String stringToAscii(String value) {
    method incisionNumber (line 725) | public static ArrayList<String> incisionNumber(String content) {
    method isSameChar (line 743) | public static boolean isSameChar(String arg) {
    method strNumberIsContinue (line 764) | public static boolean strNumberIsContinue(String str) {
    method getStringCharCount (line 786) | public static int getStringCharCount(String str) {
    method hasLength (line 797) | public static boolean hasLength(String str) {
    method hasLength (line 801) | public static boolean hasLength(CharSequence str) {
    method hasText (line 805) | public static boolean hasText(CharSequence str) {
    method hasText (line 829) | public static boolean hasText(String str) {
    method applyRelativePath (line 842) | public static String applyRelativePath(String path, String relativePat...
    method uncapitalized (line 855) | public static String uncapitalized(String name) {
    method equals (line 868) | public static boolean equals(final CharSequence cs1, final CharSequenc...

FILE: gamioo-common/src/main/java/io/gamioo/common/util/TelnetUtils.java
  class TelnetUtils (line 29) | public class TelnetUtils {
    method isConnected (line 42) | public static boolean isConnected(int checkNum, String ip, int port) {
    method isConnected (line 66) | public static boolean isConnected(String ip, int port) {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/ThreadUtils.java
  class ThreadUtils (line 28) | public class ThreadUtils {
    method sleep (line 39) | public static void sleep(long millis) {
    method printStackTrace (line 55) | public static String printStackTrace(Thread thread) {
    method printStackTrace (line 69) | public static void printStackTrace() {

FILE: gamioo-common/src/main/java/io/gamioo/common/util/XMLUtil.java
  class XMLUtil (line 21) | public class XMLUtil {
    method saveXML (line 22) | public static boolean saveXML(Element ele, String sFilePathName) throw...
    method saveXML (line 35) | public static boolean saveXML(Element ele, String sFilePathName, Strin...
    method saveXML (line 53) | public static boolean saveXML(Document dom, String sFilePathName, Stri...
    method loadFromFile (line 77) | public static Document loadFromFile(String filePathName) throws Servic...
    method loadDocument (line 82) | public static Document loadDocument(InputStream is) throws ServiceExce...
    method attributeValueInt (line 93) | public static int attributeValueInt(Element element, String attr) thro...
    method attributeValueFloat (line 108) | public static float attributeValueFloat(Element element, String attr) ...
    method attributeValueInt (line 123) | public static int attributeValueInt(Element element, String attr, int ...
    method attributeValueString (line 138) | public static String attributeValueString(Element element, String attr...
    method attributeValueString (line 149) | public static String attributeValueString(Element element, String attr...
    method attributeValueBoolean (line 160) | public static boolean attributeValueBoolean(Element element, String at...
    method attributeValueBoolean (line 175) | public static boolean attributeValueBoolean(Element element, String at...
    method subElement (line 190) | public static Element subElement(Element parent, String name) throws S...
    method parseText (line 201) | public static Element parseText(String content) {

FILE: gamioo-common/src/main/java/io/gamioo/common/vector/Vector2f.java
  class Vector2f (line 9) | public class Vector2f {
    method Vector2f (line 13) | public Vector2f(float x, float y) {
    method getX (line 18) | public float getX() {
    method getY (line 22) | public float getY() {
    method getRadians (line 26) | public double getRadians() {
    method toPoint (line 30) | public Point toPoint() {
    method getAngle (line 34) | public double getAngle() {
    method getLength (line 38) | public double getLength() {
    method valueOf (line 43) | public static Vector2f valueOf(int length, int angle) {
    method valueOf (line 51) | public static Vector2f valueOf(float x, float y) {
    method add (line 55) | public static Vector2f add(Vector2f a, Vector2f b) {
    method add (line 59) | public Vector2f add(Vector2f src) {
    method add (line 63) | public Point add(Point srcPoint) {
    method unitization (line 74) | public static Vector2f unitization(Vector2f a) {
    method unitization (line 79) | public Vector2f unitization() {
    method resizeLength (line 89) | public Vector2f resizeLength(float newLength) {
    method rotate (line 100) | public Vector2f rotate(int angle) {
    method rotate (line 108) | public Vector2f rotate(double radians) {
    method rotate (line 121) | public Vector2f rotate(Vector2f point, double radians) {
    method getVectorFromPointToPoint (line 129) | public static Vector2f getVectorFromPointToPoint(Point srcPoint, Point...
    method getVectorFromPointToPoint (line 133) | public static Vector2f getVectorFromPointToPoint(int srcX, int srcY, i...
    method dotProduct (line 144) | public static float dotProduct(Vector2f a, Vector2f b) {
    method crossProduct (line 155) | public static float crossProduct(Vector2f a, Vector2f b) {
    method getIntersectionAngle (line 166) | public static float getIntersectionAngle(Vector2f a, Vector2f b) {
    method getIntersectionAngle2 (line 181) | public static float getIntersectionAngle2(Vector2f a, Vector2f b) {

FILE: gamioo-common/src/main/java/io/gamioo/common/vector/Vector3f.java
  class Vector3f (line 8) | public class Vector3f implements Cloneable {
    method Vector3f (line 14) | public Vector3f() {
    method Vector3f (line 17) | public Vector3f(float x, float y, float z) {
    method getX (line 24) | public float getX() {
    method setX (line 28) | public void setX(float x) {
    method getY (line 32) | public float getY() {
    method setY (line 36) | public void setY(float y) {
    method getZ (line 40) | public float getZ() {
    method setZ (line 44) | public void setZ(float z) {

FILE: gamioo-common/src/test/java/io/gamioo/JsonXmlUtilTest.java
  class JsonXmlUtilTest (line 19) | @DisplayName("IOC测试")
    method beforeAll (line 26) | @BeforeAll
    method test (line 33) | @Test
    method beforeEach (line 43) | @BeforeEach
    method afterEach (line 48) | @AfterEach
    method afterAll (line 54) | @AfterAll

FILE: gamioo-common/src/test/java/io/gamioo/MainT.java
  class MainT (line 8) | public class MainT {
    method main (line 11) | public static void main(String[] args) {

FILE: gamioo-compress/src/jmh/java/io/gamioo/compress/CompressBenchMark.java
  class CompressBenchMark (line 21) | @State(Scope.Benchmark)
    method init (line 29) | @Setup(Level.Trial)
    method zstandardCompress (line 39) | @Benchmark
    method zstandardDecompress (line 54) | @Benchmark
    method zlibCompress (line 67) | @Benchmark
    method zlibDecompress (line 76) | @Benchmark
    method main (line 88) | public static void main(String[] args) {

FILE: gamioo-compress/src/jmh/java/io/gamioo/compress/SimilarityBenchMark.java
  class SimilarityBenchMark (line 22) | @State(Scope.Benchmark)
    method init (line 33) | @Setup(Level.Trial)
    method handleJaroWinkler (line 43) | @Benchmark
    method handleJaccard (line 53) | @Benchmark
    method handleRatcliffObershelp (line 61) | @Benchmark
    method main (line 71) | public static void main(String[] args) {

FILE: gamioo-compress/src/main/java/io/gamioo/compress/Main.java
  class Main (line 12) | public class Main {
    method main (line 15) | public static void main(String[] args) throws IOException {

FILE: gamioo-compress/src/main/java/io/gamioo/compress/ZlibUtil.java
  class ZlibUtil (line 16) | public class ZlibUtil {
    method compress (line 19) | public static byte[] compress(byte[] input) throws ServiceException {
    method uncompress (line 44) | public static byte[] uncompress(byte[] input) throws ServiceException {

FILE: gamioo-config/src/main/java/io/gamioo/config/NacosUtil.java
  class NacosUtil (line 15) | public class NacosUtil {
    method main (line 18) | public static void main(String[] args) {
    method initNacos (line 23) | public void initNacos() {
    method getConfigService (line 79) | private ConfigService getConfigService(String serverAddr) throws Nacos...

FILE: gamioo-config/src/main/java/io/gamioo/config/ServerConfig.java
  class ServerConfig (line 15) | public class ServerConfig {
    method getServer (line 54) | public Server getServer() {
    method setServer (line 58) | public void setServer(Server server) {
    method add (line 62) | public void add(Cache cache) {
    method getCacheList (line 66) | public List<Cache> getCacheList() {
    method setCacheList (line 70) | public void setCacheList(List<Cache> cacheList) {
    method getExternalIp (line 74) | public String getExternalIp() {
    method setExternalIp (line 78) | public void setExternalIp(String externalIp) {
    method getRpcTimeout (line 82) | public int getRpcTimeout() {
    method setRpcTimeout (line 86) | public void setRpcTimeout(int rpcTimeout) {
    method getType (line 90) | public String getType() {
    method setType (line 94) | public void setType(String type) {
    method getTcpPort (line 98) | public int getTcpPort() {
    method setTcpPort (line 102) | public void setTcpPort(int tcpPort) {
    method getWebPort (line 106) | public int getWebPort() {
    method setWebPort (line 110) | public void setWebPort(int webPort) {
    method getLocal (line 114) | public String getLocal() {
    method setLocal (line 119) | public void setLocal(String local) {
    method isDebug (line 123) | public boolean isDebug() {
    method setDebug (line 127) | public void setDebug(boolean debug) {
    method getSaveInterval (line 131) | public int getSaveInterval() {
    method setSaveInterval (line 135) | public void setSaveInterval(int saveInterval) {
    method getOfflineInterval (line 139) | public int getOfflineInterval() {
    method setOfflineInterval (line 143) | public void setOfflineInterval(int offlineInterval) {
    method getInnerPort (line 147) | public int getInnerPort() {
    method setInnerPort (line 151) | public void setInnerPort(int innerPort) {
    method getDbConfig (line 156) | public Properties getDbConfig() {
    method setDbConfig (line 160) | public void setDbConfig(Properties dbConfig) {
    method getContent (line 164) | public String getContent() {
    method setContent (line 168) | public void setContent(String content) {
    method refreshContent (line 172) | public void refreshContent() {
    method getRoot (line 176) | public Map<String, Object> getRoot() {
    method setRoot (line 180) | public void setRoot(Map<String, Object> root) {
    method getMaxConcurrentUser (line 184) | public int getMaxConcurrentUser() {
    method setMaxConcurrentUser (line 188) | public void setMaxConcurrentUser(int maxConcurrentUser) {
    method getMaxRegisterUser (line 192) | public int getMaxRegisterUser() {
    method setMaxRegisterUser (line 196) | public void setMaxRegisterUser(int maxRegisterUser) {
    method getHeartBeat (line 200) | public int getHeartBeat() {
    method setHeartBeat (line 204) | public void setHeartBeat(int heartBeat) {
    method isCompress (line 208) | public boolean isCompress() {
    method setCompress (line 212) | public void setCompress(boolean compress) {
    method getCompressThreshold (line 216) | public int getCompressThreshold() {
    method setCompressThreshold (line 220) | public void setCompressThreshold(int compressThreshold) {
    method isCrypto (line 224) | public boolean isCrypto() {
    method setCrypto (line 228) | public void setCrypto(boolean crypto) {
    method toString (line 232) | @Override

FILE: gamioo-config/src/main/java/io/gamioo/config/ServerConfigManager.java
  class ServerConfigManager (line 21) | public class ServerConfigManager {
    method load (line 26) | public void load(String type, String fileName) throws ServiceException {
    method load (line 38) | public void load(String type, File file) throws ServiceException {
    method parse (line 56) | private void parse(String type) {
    method getServerConfig (line 140) | public ServerConfig getServerConfig() {
    method getRootElement (line 145) | public Map<String, Object> getRootElement() {

FILE: gamioo-event/src/main/java/io/gamioo/event/EventService.java
  class EventService (line 6) | public class EventService {

FILE: gamioo-event/src/test/java/io/gamioo/event/guava/BaseEvent.java
  class BaseEvent (line 13) | public abstract class BaseEvent {
    method handleException (line 18) | @Override
    method handleException (line 27) | @Override
    method subscribe (line 36) | public abstract void subscribe();

FILE: gamioo-event/src/test/java/io/gamioo/event/guava/MainT.java
  class MainT (line 3) | public class MainT {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-event/src/test/java/io/gamioo/event/guava/StageEventHandler.java
  class StageEventHandler (line 7) | public class StageEventHandler {
    method getInstance (line 12) | public static StageEventHandler getInstance() {
    method handle (line 19) | @Subscribe

FILE: gamioo-event/src/test/java/io/gamioo/event/guava/UserEventHandler.java
  class UserEventHandler (line 7) | public class UserEventHandler {
    method getInstance (line 11) | public static UserEventHandler getInstance() {
    method handle (line 18) | @Subscribe
    method handle (line 25) | @Subscribe

FILE: gamioo-event/src/test/java/io/gamioo/event/guava/UserLoginEvent.java
  class UserLoginEvent (line 3) | public class UserLoginEvent extends BaseEvent{
    method getName (line 7) | public String getName() {
    method setName (line 11) | public void setName(String name) {
    method subscribe (line 15) | @Override
    method publish (line 20) | public  void publish(String name) {

FILE: gamioo-game/src/main/java/io/gamioo/game/Main.java
  class Main (line 3) | public class Main {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordUnit.java
  class DirtyWordUnit (line 12) | public class DirtyWordUnit {
    method DirtyWordUnit (line 17) | public DirtyWordUnit(String source,String word){
    method checkWordIndex (line 22) | public void checkWordIndex(){
    method isGetTheWord (line 38) | public boolean isGetTheWord(){
    method getKeyWord (line 42) | public String getKeyWord() {
    method getIndexList (line 46) | public List<Integer> getIndexList() {

FILE: gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordsReader.java
  type DirtyWordsReader (line 21) | public enum DirtyWordsReader {
    method DirtyWordsReader (line 29) | private DirtyWordsReader(){
    method readSensitiveWordFile (line 37) | private Set<String> readSensitiveWordFile() {
    method initWordsStore (line 62) | private void initWordsStore(Set<String> words ){
    method isEmpty (line 77) | private boolean isEmpty(String word){
    method getDirtyWords (line 82) | public Map<Character, List<String>> getDirtyWords() {
    method getWordCount (line 86) | public int getWordCount(){

FILE: gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordsValidator.java
  type DirtyWordsValidator (line 11) | public enum DirtyWordsValidator {
    method DirtyWordsValidator (line 20) | DirtyWordsValidator(){
    method checkDirtyWords (line 25) | public List<String> checkDirtyWords(String sentence){
    method checkWordsMatch (line 43) | private String checkWordsMatch(String source, Character key){
    method getWordCount (line 57) | public int getWordCount() {
    method main (line 61) | public static void main(String[] args) {

FILE: gamioo-game/src/test/java/io/gamioo/game/BalanceBusinessExecutorTest.java
  class BalanceBusinessExecutorTest (line 13) | @DisplayName("Rehash测试")
    method beforeAll (line 21) | @BeforeAll
    method beforeEach (line 32) | @BeforeEach
    method afterEach (line 37) | @AfterEach
    method jctoolsHash (line 42) | @DisplayName("jctools hash运算")
    method modulus (line 68) | @DisplayName("取模运算")
    method rehash8 (line 92) | @DisplayName("rehash8取模运算")
    method rehash7 (line 117) | @DisplayName("rehash7取模运算")

FILE: gamioo-game/src/test/java/io/gamioo/game/DeviationDTO.java
  class DeviationDTO (line 12) | public class DeviationDTO {
    method increase (line 16) | public void increase() {
    method getValue (line 20) | public int getValue() {
    method setValue (line 24) | public void setValue(int value) {
    method getRatio (line 28) | public String getRatio() {
    method setRatio (line 32) | public void setRatio(String ratio) {
    method toString (line 36) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/PropertyValue.java
  class PropertyValue (line 25) | public class PropertyValue {
    method getName (line 31) | public String getName() {
    method getValue (line 35) | public Object getValue() {
    method PropertyValue (line 40) | public PropertyValue(String name, Object value) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/PropertyValues.java
  class PropertyValues (line 29) | public class PropertyValues {
    method PropertyValues (line 33) | public PropertyValues() {}
    method addPropertyValue (line 35) | public void addPropertyValue(PropertyValue pv) {
    method getPropertyValues (line 39) | public List<PropertyValue> getPropertyValues() {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/AnnotationAttributes.java
  class AnnotationAttributes (line 32) | public class AnnotationAttributes extends LinkedHashMap<String, Object> {
    method AnnotationAttributes (line 41) | public AnnotationAttributes() {
    method AnnotationAttributes (line 54) | public AnnotationAttributes(Class<? extends Annotation> annotationType) {
    method annotationType (line 67) | public Class<? extends Annotation> annotationType() {
    method getString (line 81) | public String getString(String attributeName) {
    method getRequiredAttribute (line 101) | @SuppressWarnings("unchecked")

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/AnnotationBeanDefinitionReader.java
  class AnnotationBeanDefinitionReader (line 31) | public class AnnotationBeanDefinitionReader extends AbstractBeanDefiniti...
    method AnnotationBeanDefinitionReader (line 33) | public AnnotationBeanDefinitionReader(DefaultListableBeanFactory beanF...
    method loadBeanDefinitions (line 39) | public void loadBeanDefinitions(String location){

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/DefaultResourceLoader.java
  class DefaultResourceLoader (line 44) | public class DefaultResourceLoader implements ResourceLoader {
    method getResourceList (line 58) | @Override
    method doFindFileResources (line 99) | private List<Resource> doFindFileResources(String basePackage, File fi...
    method listFiles (line 122) | private List<Resource> listFiles(String basePackage, File file) {
    method getFile (line 160) | private Resource getFile(String basePackage, File file) {
    method doFindJarResources (line 165) | private List<Resource> doFindJarResources(URL url) throws IOException {
    method getJarFile (line 185) | private Resource getJarFile(String path) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanFactoryPostProcessor.java
  type BeanFactoryPostProcessor (line 25) | public interface BeanFactoryPostProcessor {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanPostProcessor.java
  type BeanPostProcessor (line 27) | public interface BeanPostProcessor {
    method postProcessBeforeInitialization (line 28) | Object postProcessBeforeInitialization(Object bean, String beanName) t...
    method postProcessAfterInitialization (line 29) | Object postProcessAfterInitialization(Object bean, String beanName) th...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanReference.java
  class BeanReference (line 26) | public class BeanReference {
    method BeanReference (line 32) | public BeanReference(String name) {
    method getName (line 36) | public String getName() {
    method setName (line 40) | public void setName(String name) {
    method getBean (line 44) | public Object getBean() {
    method setBean (line 48) | public void setBean(Object bean) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/context/ApplicationContext.java
  type ApplicationContext (line 27) | public interface ApplicationContext{
    method createBeanFactory (line 29) | DefaultListableBeanFactory createBeanFactory();
    method loadBeanDefinitions (line 31) | void loadBeanDefinitions(DefaultListableBeanFactory beanFactory);
    method getBean (line 33) | public <T> T getBean(Class<T> requiredType);

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/context/ClassPathBeanDefinitionScanner.java
  class ClassPathBeanDefinitionScanner (line 44) | public class ClassPathBeanDefinitionScanner {
    method ClassPathBeanDefinitionScanner (line 50) | public ClassPathBeanDefinitionScanner(BeanFactory beanFactory) {
    method doScan (line 55) | public void doScan(String... basePackages) {
    method analysisResourceList (line 68) | public void analysisResourceList(String location) {
    method analysisResource (line 75) | public void analysisResource(Resource resource) {
    method analysisClass (line 87) | private void analysisClass(Class<?> klass) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/context/ConfigApplicationContext.java
  class ConfigApplicationContext (line 34) | public class ConfigApplicationContext implements ApplicationContext {
    method ConfigApplicationContext (line 40) | public ConfigApplicationContext(String location) {
    method refresh (line 48) | public void refresh() {
    method refreshBeanFactory (line 57) | public DefaultListableBeanFactory refreshBeanFactory() {
    method prepareBeanFactory (line 66) | protected void prepareBeanFactory(DefaultListableBeanFactory beanFacto...
    method finishBeanFactoryInitialization (line 73) | protected void finishBeanFactoryInitialization(DefaultListableBeanFact...
    method getLocation (line 77) | public String getLocation() {
    method createBeanFactory (line 81) | @Override
    method loadBeanDefinitions (line 86) | @Override
    method getBean (line 94) | public <T> T getBean(Class<T> requiredType) {
    method getBeanListOfType (line 98) | public <T> List<T> getBeanListOfType(Class<T> type) {
    method getBeanListOfAnnotation (line 102) | public <T> List<T> getBeanListOfAnnotation(Class<? extends Annotation>...
    method getCommand (line 106) | public Command getCommand(int code) {
    method getCommandList (line 110) | public Collection<Command> getCommandList() {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/BeanDefinition.java
  type BeanDefinition (line 28) | public interface BeanDefinition extends Definition {
    method getFieldDefinitionList (line 30) | List<FieldDefinition> getFieldDefinitionList(Class<? extends Annotatio...
    method getMethodDefinitionList (line 32) | List<MethodDefinition> getMethodDefinitionList(Class<? extends Annotat...
    method newInstance (line 35) | Object newInstance();
    method analysisMethodList (line 40) | void analysisMethodList();
    method analysisFieldList (line 45) | void analysisFieldList();
    method analysisBean (line 52) | void analysisBean(Object instance);
    method getInitMethodDefinition (line 59) | MethodDefinition getInitMethodDefinition();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ConfigurationBeanDefinition.java
  class ConfigurationBeanDefinition (line 21) | public class ConfigurationBeanDefinition implements BeanDefinition {
    method ConfigurationBeanDefinition (line 27) | public ConfigurationBeanDefinition(Class<?> clazz, Annotation annotati...
    method newInstance (line 35) | @Override
    method getFieldDefinitionList (line 43) | @Override
    method getMethodDefinitionList (line 48) | @Override
    method analysisMethodList (line 57) | @Override
    method analysisFieldList (line 65) | @Override
    method analysisBean (line 74) | @Override
    method getInitMethodDefinition (line 89) | @Override
    method getClazz (line 99) | @Override
    method getName (line 104) | @Override
    method getAnnotation (line 113) | @Override
    method getAnnotationType (line 122) | @Override
    method getIndex (line 132) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ControllerBeanDefinition.java
  class ControllerBeanDefinition (line 21) | public class ControllerBeanDefinition extends GenericBeanDefinition{
    method ControllerBeanDefinition (line 26) | public ControllerBeanDefinition(Class<?> clazz, Annotation annotation) {
    method analysisBean (line 36) | @Override
    method getCommand (line 65) | public static Command getCommand(int code) {
    method getCommandList (line 70) | public static Collection<Command> getCommandList(){

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/Definition.java
  type Definition (line 27) | public interface Definition {
    method getClazz (line 29) | Class<?> getClazz();
    method getName (line 31) | String getName();
    method getAnnotation (line 38) | <T extends Annotation> T getAnnotation();
    method getAnnotationType (line 45) | Class<? extends Annotation> getAnnotationType();
    method getIndex (line 52) | int getIndex();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/FieldDefinition.java
  type FieldDefinition (line 27) | public interface FieldDefinition extends  Definition{
    method inject (line 33) | void inject(Object instance,Object value);
    method getField (line 35) | Field getField();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericBeanDefinition.java
  class GenericBeanDefinition (line 40) | public class GenericBeanDefinition implements BeanDefinition {
    method GenericBeanDefinition (line 55) | public GenericBeanDefinition(Class<?> clazz, Annotation annotation) {
    method analysisMethodList (line 65) | @Override
    method analysisMethod (line 85) | private void analysisMethod(Class<? extends Annotation> annotationType...
    method analysisFieldList (line 90) | @Override
    method analysisBean (line 108) | @Override
    method analysisField (line 114) | private void analysisField(Class<? extends Annotation> annotationType,...
    method getFieldDefinitionList (line 130) | @Override
    method getMethodDefinitionList (line 135) | @Override
    method getInitMethodDefinition (line 143) | @Override
    method getDestroyMethodDefinition (line 156) | public MethodDefinition getDestroyMethodDefinition() {
    method newInstance (line 165) | @Override
    method getClazz (line 190) | @Override
    method getName (line 195) | @Override
    method getAnnotation (line 203) | @Override
    method getAnnotationType (line 212) | @Override
    method getIndex (line 222) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericFieldDefinition.java
  class GenericFieldDefinition (line 30) | public class GenericFieldDefinition implements FieldDefinition {
    method GenericFieldDefinition (line 34) | public GenericFieldDefinition(Field field) {
    method getAnnotation (line 39) | @Override
    method getClazz (line 45) | @Override
    method getField (line 51) | @Override
    method getName (line 57) | @Override
    method getAnnotationType (line 65) | @Override
    method inject (line 75) | @Override
    method getIndex (line 89) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericMethodDefinition.java
  class GenericMethodDefinition (line 32) | public class GenericMethodDefinition implements MethodDefinition {
    method GenericMethodDefinition (line 39) | public GenericMethodDefinition(MethodAccess access, Method method) {
    method getAnnotation (line 47) | @Override
    method getClazz (line 52) | @Override
    method getName (line 57) | @Override
    method getAnnotationType (line 65) | @Override
    method getMethodAccess (line 75) | @Override
    method getIndex (line 85) | @Override
    method invoke (line 91) | public Object invoke(Object instance, Object... args) {
    method getMethodWrapper (line 103) | public MethodWrapper getMethodWrapper(Object instance) {
    method getParameters (line 113) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ListFieldDefinition.java
  class ListFieldDefinition (line 12) | public class ListFieldDefinition extends GenericFieldDefinition {
    method ListFieldDefinition (line 15) | public ListFieldDefinition(Field field) {
    method getClazz (line 19) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/MapFieldDefinition.java
  class MapFieldDefinition (line 12) | public class MapFieldDefinition extends GenericFieldDefinition {
    method MapFieldDefinition (line 15) | public MapFieldDefinition(Field field) {
    method getClazz (line 19) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/MethodDefinition.java
  type MethodDefinition (line 30) | public interface MethodDefinition extends  Definition{
    method getMethodAccess (line 38) | MethodAccess getMethodAccess();
    method getParameters (line 45) | Parameter[] getParameters();
    method invoke (line 47) | Object invoke(Object instance,Object ...args);
    method getMethodWrapper (line 49) | MethodWrapper getMethodWrapper(Object instance);

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ResourceBeanDefinition.java
  class ResourceBeanDefinition (line 11) | public class ResourceBeanDefinition extends GenericBeanDefinition{
    method ResourceBeanDefinition (line 12) | public ResourceBeanDefinition(Class<?> clazz, Annotation annotation) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/BeanFactory.java
  type BeanFactory (line 34) | public interface BeanFactory {
    method registerBeanDefinition (line 36) | public void registerBeanDefinition(String beanName, BeanDefinition bea...
    method getBean (line 38) | public <T> T getBean(Class<T> requiredType);
    method getBean (line 40) | public Object getBean(String name) throws BeansException;
    method getBeanListOfType (line 42) | public <T> List<T> getBeanListOfType(Class<T> type);
    method getBeanListOfAnnotation (line 44) | public <T> List<T> getBeanListOfAnnotation(Class<? extends Annotation>...
    method getBean (line 46) | public <T> T getBean(String name, Class<T> requiredType);
    method getBeanMapOfType (line 48) | public <T> Map<String,T> getBeanMapOfType(Class<T> type);
    method preInstantiateSingletons (line 50) | void preInstantiateSingletons();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/ObjectFactory.java
  type ObjectFactory (line 33) | public interface ObjectFactory<T> {
    method getObject (line 41) | T getObject() throws BeansException;

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractAutowireCapableBeanFactory.java
  class AbstractAutowireCapableBeanFactory (line 32) | public abstract class AbstractAutowireCapableBeanFactory extends Abstrac...
    method createBean (line 34) | @Override
    method doCreateBean (line 39) | Object doCreateBean(BeanDefinition beanDefinition) {
    method createBeanInstance (line 59) | @Override
    method instantiateBean (line 71) | protected Object instantiateBean(BeanDefinition beanDefinition) {
    method populateBean (line 78) | @Override
    method initializeBean (line 111) | @Override
    method invokeInitMethods (line 120) | private void invokeInitMethods(Object object, BeanDefinition beanDefin...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanDefinition.java
  class AbstractBeanDefinition (line 33) | public abstract class AbstractBeanDefinition implements BeanDefinition {
    method getBean (line 51) | public Object getBean() {
    method setBean (line 55) | public void setBean(Object bean) {
    method getBeanClass (line 59) | public Class<?> getBeanClass() {
    method getAnnotation (line 63) | public Annotation getAnnotation() {
    method setAnnotation (line 67) | public void setAnnotation(Annotation annotation) {
    method getAnnotationType (line 71) | public Class<? extends Annotation> getAnnotationType() {
    method setAnnotationType (line 75) | public void setAnnotationType(Class<? extends Annotation> annotationTy...
    method getInitMethodName (line 79) | public String getInitMethodName() {
    method setInitMethodName (line 83) | public void setInitMethodName(String initMethodName) {
    method getDestroyMethodName (line 87) | public String getDestroyMethodName() {
    method setDestroyMethodName (line 91) | public void setDestroyMethodName(String destroyMethodName) {
    method setBeanClass (line 95) | public void setBeanClass(Class beanClass) {
    method getBeanClassName (line 99) | public String getBeanClassName() {
    method setBeanClassName (line 103) | public void setBeanClassName(String beanClassName) {
    method getPropertyValues (line 112) | public PropertyValues getPropertyValues() {
    method setPropertyValues (line 119) | public void setPropertyValues(PropertyValues propertyValues) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanDefinitionReader.java
  class AbstractBeanDefinitionReader (line 28) | public abstract class AbstractBeanDefinitionReader implements BeanDefini...
    method AbstractBeanDefinitionReader (line 36) | public AbstractBeanDefinitionReader(BeanFactory beanFactory) {
    method getBeanFactory (line 40) | public BeanFactory getBeanFactory() {
    method setBeanFactory (line 44) | public void setBeanFactory(BeanFactory beanFactory) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanFactory.java
  class AbstractBeanFactory (line 39) | public abstract class AbstractBeanFactory implements BeanFactory {
    method getBean (line 70) | @SuppressWarnings("unchecked")
    method registerBeanDefinition (line 76) | @Override
    method preInstantiateSingletons (line 84) | @Override
    method getBean (line 92) | @Override
    method doGetBean (line 99) | @SuppressWarnings("unchecked")
    method getBeanListOfType (line 110) | @SuppressWarnings("unchecked")
    method getBeanMapOfType (line 125) | @SuppressWarnings("unchecked")
    method getBeanListOfAnnotation (line 143) | @SuppressWarnings("unchecked")
    method getBean (line 158) | @SuppressWarnings("unchecked")
    method addSingleton (line 182) | protected void addSingleton(String beanName, Object singletonObject) {
    method addSingletonFactory (line 201) | protected void addSingletonFactory(String beanName, ObjectFactory<?> s...
    method getSingleton (line 217) | protected Object getSingleton(String beanName) {
    method getSingleton (line 236) | public Object getSingleton(String beanName, ObjectFactory<?> singleton...
    method destroySingleton (line 251) | public void destroySingleton(String beanName) {
    method removeSingleton (line 262) | protected void removeSingleton(String beanName) {
    method isSingletonCurrentlyInCreation (line 275) | public boolean isSingletonCurrentlyInCreation(String beanName) {
    method beforeSingletonCreation (line 286) | protected void beforeSingletonCreation(String beanName) {
    method afterSingletonCreation (line 298) | protected void afterSingletonCreation(String beanName) {
    method getEarlyBeanReference (line 303) | protected Object getEarlyBeanReference(Object bean) {
    method createBean (line 321) | abstract Object createBean(BeanDefinition beanDefinition);
    method createBeanInstance (line 323) | abstract Object createBeanInstance(BeanDefinition beanDefinition);
    method populateBean (line 325) | abstract void populateBean(Object instance, BeanDefinition beanDefinit...
    method initializeBean (line 327) | abstract void initializeBean(Object instance, BeanDefinition beanDefin...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/BeanDefinitionReader.java
  type BeanDefinitionReader (line 25) | public interface BeanDefinitionReader {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/DefaultListableBeanFactory.java
  class DefaultListableBeanFactory (line 39) | public class DefaultListableBeanFactory extends AbstractAutowireCapableB...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/xml/XmlBeanDefinitionReader.java
  class XmlBeanDefinitionReader (line 42) | public class XmlBeanDefinitionReader extends AbstractBeanDefinitionReader {
    method XmlBeanDefinitionReader (line 44) | public XmlBeanDefinitionReader(ResourceLoader resourceLoader) {
    method analysisResourceList (line 48) | public void analysisResourceList(String location) throws IOException {
    method analysisResource (line 55) | protected void analysisResource(Resource resource) throws IOException {
    method registerBeanDefinitions (line 69) | public void registerBeanDefinitions(Document doc) {
    method parseBeanDefinitions (line 75) | protected void parseBeanDefinitions(Element root) {
    method processBeanDefinition (line 86) | protected void processBeanDefinition(Element ele) {
    method processProperty (line 95) | private void processProperty(Element ele, AbstractBeanDefinition beanD...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/factory/xml/XmlResourceLoader.java
  class XmlResourceLoader (line 33) | public class XmlResourceLoader  implements ResourceLoader {
    method getResourceList (line 45) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/AbstractResource.java
  class AbstractResource (line 27) | public abstract  class AbstractResource implements Resource{
    method AbstractResource (line 30) | protected AbstractResource(String name) {
    method getName (line 34) | @Override
    method getClassName (line 38) | @Override
    method toString (line 43) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/FileClassResource.java
  class FileClassResource (line 27) | public class FileClassResource extends AbstractResource {
    method FileClassResource (line 30) | public FileClassResource(String path, File file) {
    method getClassName (line 35) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/JarClassResource.java
  class JarClassResource (line 25) | public class JarClassResource extends AbstractResource  {
    method JarClassResource (line 26) | public JarClassResource(String path) {
    method getClassName (line 30) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/Resource.java
  type Resource (line 25) | public interface Resource {
    method getName (line 32) | String getName();
    method getClassName (line 35) | String getClassName();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/ResourceCallback.java
  type ResourceCallback (line 25) | public interface ResourceCallback {
    method handle (line 26) | void handle();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/ResourceLoader.java
  type ResourceLoader (line 29) | public interface ResourceLoader {
    method getResourceList (line 33) | List<Resource> getResourceList(String location) throws IOException;

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/io/UrlFileResource.java
  class UrlFileResource (line 26) | public class UrlFileResource extends AbstractResource {
    method UrlFileResource (line 29) | public UrlFileResource(String uri) {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/AnnotatedTypeMetadata.java
  type AnnotatedTypeMetadata (line 25) | public interface AnnotatedTypeMetadata {
    method isAnnotated (line 34) | boolean isAnnotated(String annotationName);

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/AnnotationMetadata.java
  type AnnotationMetadata (line 25) | public interface AnnotationMetadata  extends ClassMetadata, AnnotatedTyp...

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/ClassMetadata.java
  type ClassMetadata (line 25) | public interface ClassMetadata {
    method getClassName (line 31) | String getClassName();
    method isInterface (line 36) | boolean isInterface();
    method isAnnotation (line 42) | boolean isAnnotation();
    method isAbstract (line 47) | boolean isAbstract();
    method isConcrete (line 53) | boolean isConcrete();
    method isFinal (line 58) | boolean isFinal();
    method isIndependent (line 66) | boolean isIndependent();
    method hasEnclosingClass (line 75) | boolean hasEnclosingClass();
    method getEnclosingClassName (line 81) | String getEnclosingClassName();
    method hasSuperClass (line 86) | boolean hasSuperClass();
    method getSuperClassName (line 92) | String getSuperClassName();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/MethodMetadata.java
  type MethodMetadata (line 25) | public interface MethodMetadata extends AnnotatedTypeMetadata {
    method getMethodName (line 30) | String getMethodName();
    method getDeclaringClassName (line 35) | String getDeclaringClassName();
    method getReturnTypeName (line 41) | String getReturnTypeName();
    method isAbstract (line 50) | boolean isAbstract();
    method isStatic (line 55) | boolean isStatic();
    method isFinal (line 60) | boolean isFinal();
    method isOverridable (line 66) | boolean isOverridable();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/AnnotationMetadataReadingVisitor.java
  class AnnotationMetadataReadingVisitor (line 33) | public class AnnotationMetadataReadingVisitor extends ClassMetadataReadi...
    method AnnotationMetadataReadingVisitor (line 47) | public AnnotationMetadataReadingVisitor(ClassLoader classLoader) {
    method getAnnotationTypes (line 52) | public Set<String> getAnnotationTypes() {
    method getMetaAnnotationTypes (line 56) | public Set<String> getMetaAnnotationTypes(String annotationName) {
    method hasAnnotation (line 61) | public boolean hasAnnotation(String annotationName) {
    method isAnnotated (line 64) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/ClassMetadataReadingVisitor.java
  class ClassMetadataReadingVisitor (line 30) | public class ClassMetadataReadingVisitor implements ClassMetadata {
    method getClassName (line 51) | public String getClassName() {
    method isInterface (line 55) | public boolean isInterface() {
    method isAnnotation (line 59) | public boolean isAnnotation() {
    method isAbstract (line 63) | public boolean isAbstract() {
    method isFinal (line 67) | public boolean isFinal() {
    method getEnclosingClassName (line 71) | public String getEnclosingClassName() {
    method isIndependentInnerClass (line 75) | public boolean isIndependentInnerClass() {
    method getSuperClassName (line 79) | public String getSuperClassName() {
    method getInterfaces (line 83) | public String[] getInterfaces() {
    method getMemberClassNames (line 87) | public Set<String> getMemberClassNames() {
    method isConcrete (line 90) | @Override
    method isIndependent (line 95) | @Override
    method hasEnclosingClass (line 100) | @Override
    method hasSuperClass (line 104) | @Override

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/MetadataReader.java
  type MetadataReader (line 29) | public interface MetadataReader {
    method getResource (line 33) | Resource getResource();
    method getClassMetadata (line 38) | ClassMetadata getClassMetadata();
    method getAnnotationMetadata (line 44) | AnnotationMetadata getAnnotationMetadata();

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/BeanWrapper.java
  class BeanWrapper (line 25) | public class BeanWrapper {
    method BeanWrapper (line 28) | public BeanWrapper(Object object) {
    method getWrappedInstance (line 37) | public Object getWrappedInstance() {
    method getWrappedClass (line 47) | public Class<?> getWrappedClass() {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/Command.java
  class Command (line 17) | public class Command {
    method Command (line 31) | public Command(MethodWrapper wrapper, CommandMapping mapping) {
    method getCode (line 40) | public int getCode() {
    method isValid (line 44) | public boolean isValid() {
    method setValid (line 48) | public void setValid(boolean valid) {
    method isPrint (line 52) | public boolean isPrint() {
    method isLogin (line 56) | public boolean isLogin() {
    method isCross (line 60) | public boolean isCross() {
    method increase (line 64) | public void increase() {
    method getInvokeNumber (line 69) | public long getInvokeNumber() {
    method toString (line 73) | public String toString() {

FILE: gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/MethodWrapper.java
  class MethodWrapper (line 31) | public class MethodWrapper {
    method MethodWrapper (line 39) | public MethodWrapper( Object instance,Method method,MethodAccess acces...
    method MethodWrapper (line 47) | public MethodWrapper(Method method, Object instance) {
    method invoke (line 55) | public Object invoke(Object... args) {
    method getName (line 67) | public String getName() {
    method setName (line 71) | public void setName(String name) {
    method getParamClazz (line 75) | public Class<?> getParamClazz() {
    method setParamClazz (line 79) | public void setParamClazz(Class<?> paramClazz) {
    method toString (line 83) | public String toString() {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/DebugService.java
  class DebugService (line 15) | @Service
    method handle (line 22) | public void handle(String value){

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/IOCFactoryTest.java
  class IOCFactoryTest (line 37) | @DisplayName("IOC测试")
    method beforeAll (line 44) | @BeforeAll
    method test (line 51) | @Test
    method handleConfig (line 63) | @Test
    method handleControl (line 72) | @Test
    method beforeEach (line 81) | @BeforeEach
    method afterEach (line 86) | @AfterEach
    method afterAll (line 92) | @AfterAll

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/MapTest.java
  class MapTest (line 28) | public class MapTest {
    method main (line 29) | public static void main(String[] args) {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/RoleService.java
  class RoleService (line 16) | @Service
    method handleCommand (line 24) | public void handleCommand(String value) {
    method getSkillList (line 30) | public List<AbstractSkill> getSkillList() {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/SkillService.java
  class SkillService (line 15) | @Service
    method getSkillList (line 21) | public List<AbstractSkill> getSkillList() {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/XmlBeanFactoryTest.java
  class XmlBeanFactoryTest (line 34) | @DisplayName("IOC测试")
    method beforeAll (line 41) | @BeforeAll
    method test (line 49) | @Test
    method beforeEach (line 61) | @BeforeEach
    method afterEach (line 66) | @AfterEach
    method afterAll (line 72) | @AfterAll

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/action/UserController.java
  class UserController (line 14) | @Controller
    method login (line 17) | @CommandMapping(code=10001,cross = true,print = false,login = false)

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/entity/Cache.java
  class Cache (line 9) | public class Cache {
    method getType (line 16) | public int getType() {
    method setType (line 20) | public void setType(int type) {
    method getIp (line 24) | public String getIp() {
    method setIp (line 28) | public void setIp(String ip) {
    method getPort (line 32) | public int getPort() {
    method setPort (line 36) | public void setPort(int port) {
    method getIndex (line 40) | public int getIndex() {
    method setIndex (line 44) | public void setIndex(int index) {
    method getPassword (line 48) | public String getPassword() {
    method setPassword (line 52) | public void setPassword(String password) {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/entity/DB.java
  class DB (line 9) | public class DB {
    method getJdbcUser (line 14) | public String getJdbcUser() {
    method setJdbcUser (line 18) | public void setJdbcUser(String jdbcUser) {
    method getJdbcUrl (line 22) | public String getJdbcUrl() {
    method setJdbcUrl (line 26) | public void setJdbcUrl(String jdbcUrl) {
    method getJdbcPassword (line 30) | public String getJdbcPassword() {
    method setJdbcPassword (line 34) | public void setJdbcPassword(String jdbcPassword) {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/entity/Server.java
  class Server (line 9) | public class Server {
    method getTcpPort (line 16) | public int getTcpPort() {
    method setTcpPort (line 20) | public void setTcpPort(int tcpPort) {
    method getName (line 24) | public String getName() {
    method setName (line 28) | public void setName(String name) {
    method getId (line 32) | public int getId() {
    method setId (line 36) | public void setId(int id) {
    method getExternalIp (line 40) | public String getExternalIp() {
    method setExternalIp (line 44) | public void setExternalIp(String externalIp) {
    method getWebPort (line 48) | public int getWebPort() {
    method setWebPort (line 52) | public void setWebPort(int webPort) {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/entity/ServerConfig.java
  class ServerConfig (line 31) | @Configuration("gate-config.xml")
    method isLocation (line 43) | public boolean isLocation() {
    method setLocation (line 47) | public void setLocation(boolean location) {
    method getLocal (line 51) | public String getLocal() {
    method setLocal (line 55) | public void setLocal(String local) {
    method isDebug (line 59) | public boolean isDebug() {
    method setDebug (line 63) | public void setDebug(boolean debug) {
    method getOfflineInterval (line 67) | public int getOfflineInterval() {
    method setOfflineInterval (line 71) | public void setOfflineInterval(int offlineInterval) {
    method getSaveInterval (line 75) | public int getSaveInterval() {
    method setSaveInterval (line 79) | public void setSaveInterval(int saveInterval) {
    method getRpcTimeout (line 83) | public int getRpcTimeout() {
    method setRpcTimeout (line 87) | public void setRpcTimeout(int rpcTimeout) {
    method getDb (line 91) | public DB getDb() {
    method setDb (line 95) | public void setDb(DB db) {
    method getCache (line 99) | public List<Cache> getCache() {
    method setCache (line 103) | public void setCache(List<Cache> cache) {
    method getServer (line 107) | public Server getServer() {
    method setServer (line 111) | public void setServer(Server server) {
    method toString (line 115) | public String toString() {

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddItemCommand.java
  class AddItemCommand (line 13) | @Component(name="-- add item")
    method execute (line 16) | @Override

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddMoneyCommand.java
  class AddMoneyCommand (line 13) | @Component(name="-- add money")
    method execute (line 17) | @Override

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddRmbCommand.java
  class AddRmbCommand (line 13) | @Component(name="-- add rmb")
    method execute (line 16) | @Override

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/map/Command.java
  type Command (line 9) | public interface Command {
    method execute (line 11) | void execute();

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/skill/AbstractSkill.java
  class AbstractSkill (line 13) | public  abstract class AbstractSkill {
    method init (line 15) | public abstract void init();
    method handle (line 17) | public abstract  void handle();
    method toString (line 19) | public String toString(){

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/skill/SkillA.java
  class SkillA (line 15) | @Component(name="A")
    method init (line 19) | @PostConstruct
    method handle (line 24) | @Override

FILE: gamioo-ioc/src/test/java/io/gamioo/ioc/skill/SkillB.java
  class SkillB (line 15) | @Component(name="B")
    method init (line 18) | @Override
    method handle (line 24) | @Override

FILE: gamioo-log/src/main/java/io/gamioo/log/MainT.java
  class MainT (line 3) | public class MainT {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-log/src/test/java/io/gamioo/log/Main.java
  class Main (line 3) | public class Main {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-navigation/src/jmh/java/io/gamioo/nav/NavEngineBenchMark.java
  class NavEngineBenchMark (line 17) | @State(Scope.Benchmark)
    method init (line 42) | @Setup(Level.Trial)
    method nativeFind (line 58) | @Benchmark
    method nativeRaycast (line 63) | @Benchmark
    method nativeFindNearest (line 68) | @Benchmark
    method javaFind (line 73) | @Benchmark
    method javaRaycast (line 78) | @Benchmark
    method javaFindNearest (line 83) | @Benchmark
    method main (line 89) | public static void main(String[] args) {

FILE: gamioo-navigation/src/main/java/io/gamioo/nav/Easy3dNav.java
  class Easy3dNav (line 23) | public class Easy3dNav implements EasyNavFunc {
    method Easy3dNav (line 43) | public Easy3dNav() {
    method Easy3dNav (line 53) | public Easy3dNav(boolean useU3dData, boolean printMeshInfo) {
    method Easy3dNav (line 59) | public Easy3dNav(String filePath) throws IOException {
    method init (line 69) | public void init(String filePath) throws IOException {
    method loadNavMesh (line 82) | private NavMesh loadNavMesh(String meshFile) throws IOException {
    method printMeshInfo (line 118) | private void printMeshInfo(NavMesh mesh) {
    method setExtents (line 159) | public void setExtents(float[] extents) {
    method setUseU3dData (line 169) | public void setUseU3dData(boolean useU3dData) {
    method setPrintMeshInfo (line 173) | public void setPrintMeshInfo(boolean printMeshInfo) {
    method find (line 177) | @Override
    method find (line 212) | @Override
    method find (line 219) | @Override
    method find (line 224) | @Override
    method raycast (line 230) | @Override
    method raycast (line 250) | @Override
    method raycast (line 256) | @Override
    method raycast (line 261) | @Override
    method findNearest (line 267) | @Override
    method findNearest (line 273) | @Override
    method findNearest (line 280) | @Override
    method findNearest (line 286) | @Override
    method v3fToFArr (line 293) | private static float[] v3fToFArr(Vector3f vector3f) {
    method FArrTov3f (line 301) | private static Vector3f FArrTov3f(float[] point) {

FILE: gamioo-navigation/src/main/java/io/gamioo/nav/INav.java
  type INav (line 10) | public interface INav {
    method find (line 20) | List<float[]> find(float[] start, float[] end);
    method find (line 22) | List<Vector3f> find(Vector3f start, Vector3f end);
    method raycast (line 32) | float[] raycast(float[] start, float[] end);
    method raycast (line 34) | Vector3f raycast(Vector3f start, Vector3f end);
    method findNearest (line 43) | float[] findNearest(float[] point);
    method findNearest (line 45) | Vector3f findNearest(Vector3f point);
    method vector2Point (line 47) | default float[] vector2Point(Vector3f vector3f) {
    method point2Vector (line 55) | default Vector3f point2Vector(float[] point) {

FILE: gamioo-navigation/src/main/java/io/gamioo/nav/Main.java
  class Main (line 5) | public class Main {
    method main (line 8) | public static void main(String[] args) throws IOException {

FILE: gamioo-navigation/src/main/java/io/gamioo/nav/NavEngine.java
  class NavEngine (line 19) | public class NavEngine implements INav {
    method init (line 36) | public void init(int id, String filePath) throws IOException {
    method load (line 57) | public native int load(int navmeshId, byte[] content, int length);
    method find (line 71) | public native float[] find(int navmeshId, float startX, float startY, ...
    method findNearest (line 82) | public native float[] findNearest(int navmeshId, float pointX, float p...
    method raycast (line 97) | public native float[] raycast(int navmeshId, float startX, float start...
    method release (line 105) | public native void release(int navmeshId);
    method releaseAll (line 111) | public native void releaseAll();
    method find (line 114) | @Override
    method find (line 133) | @Override
    method raycast (line 140) | @Override
    method raycast (line 145) | @Override
    method findNearest (line 156) | @Override
    method findNearest (line 161) | @Override

FILE: gamioo-navigation/src/test/java/io/gamioo/nav/NavEngineTest.java
  class NavEngineTest (line 13) | @DisplayName("Recast native test")
    method beforeAll (line 32) | @BeforeAll
    method afterAll (line 49) | @AfterAll
    method nativeFind (line 55) | @DisplayName("C++寻路")
    method javaFind (line 63) | @DisplayName("Java寻路")
    method nativeRaycast (line 72) | @DisplayName("C++射线")
    method javaRaycast (line 80) | @DisplayName("java射线")
    method nativeFindNearest (line 88) | @DisplayName("C++寻找最近的可通点")
    method javaFindNearest (line 96) | @DisplayName("java寻找最近的可通点")

FILE: gamioo-network/src/main/java/io/gamioo/network/util/IPUtil.java
  class IPUtil (line 21) | public class IPUtil {
    method getIP (line 31) | public static String getIP() throws ServiceException {
    method ipToLong (line 62) | public static long ipToLong(String strIp) {
    method longToIP (line 78) | public static String longToIP(long longIp) {
    method isInner (line 99) | public static boolean isInner(String ip) {
    method getRemortIP (line 107) | public static String getRemortIP(Channel channel) {
    method getRemoteIP (line 122) | public static String getRemoteIP(HttpServletRequest request) {
    method getRemoteIP (line 136) | public static String getRemoteIP(FullHttpRequest httpRequest) {
    method main (line 155) | public static void main(String[] args) {

FILE: gamioo-network/src/test/java/io/gamioo/network/MainT.java
  class MainT (line 3) | public class MainT {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-orm/src/main/java/io/gamioo/orm/OrmService.java
  class OrmService (line 6) | public class OrmService {

FILE: gamioo-orm/src/test/java/io/gamioo/orm/MainT.java
  class MainT (line 3) | public class MainT {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-protocol/src/main/java/io/gamioo/protocol/ProtocolService.java
  class ProtocolService (line 6) | public class ProtocolService {

FILE: gamioo-protocol/src/test/java/io/gamioo/protocol/MainT.java
  class MainT (line 3) | public class MainT {
    method main (line 5) | public static void main(String[] args) {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/Redis.java
  class Redis (line 18) | public class Redis {
    method Redis (line 33) | public Redis(String host, int port) {
    method Redis (line 37) | public Redis(String host, int port, int database) {
    method Redis (line 41) | public Redis(String host, int port, String password) {
    method Redis (line 52) | public Redis(String host, int port, String password, int index) {
    method Redis (line 64) | public Redis(String host, int port, int timeout, String password, int ...
    method Redis (line 72) | public Redis(int connection, String host, int port, int timeout, Strin...
    method ping (line 82) | public void ping() {
    method type (line 98) | public String type(String key) {
    method del (line 107) | public Long del(String key) {
    method debug (line 116) | public String debug(String key) {
    method del (line 125) | public void del(byte[] key) {
    method del (line 142) | public long del(String... keys) {
    method keys (line 183) | public Set<String> keys(String pattern) {
    method keys (line 198) | public Set<byte[]> keys(byte[] pattern) {
    method expire (line 216) | public long expire(String key, int seconds) {
    method persist (line 229) | public long persist(String key) {
    method ttl (line 241) | public long ttl(String key) {
    method set (line 264) | public void set(String key, String value) {
    method rename (line 275) | public void rename(String key, String newKey) {
    method get (line 293) | public String get(String key) {
    method exists (line 310) | public boolean exists(String key) {
    method decrBy (line 324) | public long decrBy(String key, long value) {
    method setex (line 337) | public String setex(String key, int seconds, String value) {
    method set (line 346) | public String set(byte[] key, byte[] value) {
    method setex (line 355) | public String setex(byte[] key, int seconds, byte[] value) {
    method get (line 364) | public byte[] get(byte[] key) {
    method mget (line 373) | public List<String> mget(String... keys) {
    method mget (line 382) | public List<byte[]> mget(byte[]... keys) {
    method mset (line 391) | public String mset(String... kvs) {
    method incr (line 403) | public long incr(String key) {
    method hlen (line 419) | public long hlen(String key) {
    method hexists (line 432) | public boolean hexists(String key, String field) {
    method hmset (line 452) | public String hmset(String key, Map<String, String> value) {
    method hmset (line 470) | public void hmset(Collection<Object> datas, String key, String field, ...
    method hmset (line 493) | public String hmset(byte[] key, Map<byte[], byte[]> value) {
    method hmget (line 512) | public List<String> hmget(String key, String... fields) {
    method hkeys (line 533) | public Set<String> hkeys(String key) {
    method hvals (line 552) | public List<String> hvals(String key) {
    method hget (line 572) | public String hget(String key, String field) {
    method hget (line 590) | public byte[] hget(byte[] key, byte[] field) {
    method hset (line 602) | public Long hset(String key, String field, String value) {
    method hsetnx (line 615) | public Long hsetnx(String key, String field, String value) {
    method hset (line 628) | public Long hset(byte[] key, byte[] field, byte[] value) {
    method hgetAll (line 648) | public Map<String, String> hgetAll(String key) {
    method hgetAll (line 669) | public Map<byte[], byte[]> hgetAll(byte[] key) {
    method hdel (line 692) | public long hdel(String key, String... field) {
    method hincrBy (line 714) | public long hincrBy(String key, String field, long value) {
    method rpop (line 735) | public String rpop(String key) {
    method llen (line 751) | public long llen(String key) {
    method lrange (line 769) | public List<String> lrange(String key, long start, long end) {
    method lrange (line 780) | public List<byte[]> lrange(byte[] key, int start, int end) {
    method lindex (line 797) | public String lindex(String key, long index) {
    method lrem (line 835) | public long lrem(String key, String value) {
    method lpush (line 852) | public long lpush(String key, String... value) {
    method lpush (line 861) | public long lpush(byte[] key, byte[] value) {
    method rpush (line 870) | public long rpush(String key, String... value) {
    method blpop (line 879) | public List<String> blpop(int timeout, String... key) {
    method ltrim (line 891) | public void ltrim(String key, int start, int end) {
    method sadd (line 915) | public long sadd(String key, String value) {
    method sadd (line 924) | public long sadd(String key, String[] value) {
    method save (line 933) | public String save() {
    method smembers (line 949) | public Set<String> smembers(String key) {
    method spop (line 960) | public String spop(String key) {
    method srem (line 975) | public long srem(String key, String value) {
    method srem (line 989) | public long srem(String key, String... value) {
    method scard (line 1001) | public long scard(String key) {
    method sismember (line 1013) | public boolean sismember(String key, String value) {
    method smove (line 1027) | public long smove(String srckey, String dstkey, String member) {
    method zadd (line 1053) | public long zadd(String key, double score, String member) {
    method zadd (line 1063) | public long zadd(String key, Map<String, Double> map) {
    method zrank (line 1083) | public Long zrank(String key, String member) {
    method zrevrank (line 1102) | public Long zrevrank(String key, String member) {
    method zrange (line 1121) | public Set<String> zrange(String key, long start, long end) {
    method zrevrange (line 1142) | public Set<String> zrevrange(String key, long start, long end) {
    method zrangeByScore (line 1161) | public Set<String> zrangeByScore(String key, double min, double max) {
    method zrevrangeByScore (line 1180) | public Set<String> zrevrangeByScore(String key, double max, double min) {
    method zrevrangeWithScore (line 1197) | public Set<Tuple> zrevrangeWithScore(String key, int start, int end) {
    method zrangeWithScore (line 1213) | public Set<Tuple> zrangeWithScore(String key, int start, int end) {
    method zrangeByScoreWithScores (line 1229) | public Set<Tuple> zrangeByScoreWithScores(String key, String min, Stri...
    method zrevrangeByScoreWithScores (line 1244) | public Set<Tuple> zrevrangeByScoreWithScores(String key, String min, S...
    method zscore (line 1263) | public long zscore(String key, String member) {
    method zscorex (line 1285) | public Double zscorex(String key, String member) {
    method zcount (line 1304) | public long zcount(String key, double min, double max) {
    method zcount (line 1321) | public long zcount(String key) {
    method zrem (line 1339) | public long zrem(String key, String... members) {
    method zremrangeByRank (line 1353) | public long zremrangeByRank(String key, int start, int stop) {
    method zremrangeByScore (line 1367) | public long zremrangeByScore(String key, double min, double max) {
    method zcard (line 1383) | public long zcard(String key) {
    method zincrby (line 1397) | public double zincrby(String key, double increment, String member) {
    method eval (line 1412) | public Object eval(String script) {
    method publish (line 1429) | public long publish(String channel, String message) {
    method subscribe (line 1443) | public void subscribe(JedisPubSub jedisPubSub, String... channel) {
    method psubscribe (line 1459) | public void psubscribe(JedisPubSub jedisPubSub, String... channel) {
    method flushDB (line 1474) | public void flushDB() {
    method dbSize (line 1487) | public long dbSize() {
    method quit (line 1499) | public String quit() {
    method destory (line 1508) | public void destory() {
    method migrate (line 1516) | public String migrate(String host, int port, String key, int destinati...
    method migrate (line 1535) | public static void migrate(String fromHost, int fromPort, int fromInde...
    method migrate (line 1549) | public List<Object> migrate(String host, int port, int destinationDb, ...
    method getJedis (line 1566) | public Jedis getJedis() {
    method getPool (line 1574) | public JedisPool getPool() {
    method setPool (line 1578) | public void setPool(JedisPool pool) {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/RedisConstant.java
  class RedisConstant (line 6) | public class RedisConstant {
    method getServerChannel (line 136) | public static String getServerChannel(String serverType, int serverId) {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/ZSetUtils.java
  class ZSetUtils (line 28) | public class ZSetUtils {
    method convertStartRank (line 50) | public static int convertStartRank(int start, int zslLength) {
    method convertEndRank (line 67) | public static int convertEndRank(int end, int zslLength) {
    method isRankRangeEmpty (line 85) | public static boolean isRankRangeEmpty(final int start, final int end,...
    method zslRandomLevel (line 103) | public static int zslRandomLevel() {
    method releaseUpdate (line 117) | public static void releaseUpdate(Object[] update, int realLength) {
    method releaseRank (line 129) | public static void releaseRank(int[] rank, int realLength) {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/Entry.java
  type Entry (line 22) | public interface Entry<K, S> {
    method getMember (line 24) | K getMember();
    method getScore (line 26) | S getScore();

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/GenericZSet.java
  class GenericZSet (line 61) | @NotThreadSafe
    method GenericZSet (line 70) | private GenericZSet(Comparator<K> objComparator, ScoreHandler<S> score...
    method newStringKeyZSet (line 81) | public static <S> GenericZSet<String, S> newStringKeyZSet(ScoreHandler...
    method newLongKeyZSet (line 92) | public static <S> GenericZSet<Long, S> newLongKeyZSet(ScoreHandler<S> ...
    method newIntKeyZSet (line 103) | public static <S> GenericZSet<Integer, S> newIntKeyZSet(ScoreHandler<S...
    method newGenericKeyZSet (line 117) | public static <K, S> GenericZSet<K, S> newGenericKeyZSet(Comparator<K>...
    method zadd (line 129) | public void zadd(final S score, @Nonnull final K member) {
    method zaddnx (line 148) | public boolean zaddnx(final S score, @Nonnull final K member) {
    method zincrby (line 167) | public S zincrby(S increment, @Nonnull K member) {
    method zincrbyxx (line 184) | public S zincrbyxx(S increment, @Nonnull K member) {
    method zrem (line 205) | public S zrem(@Nonnull K member) {
    method zremrangeByScore (line 225) | public int zremrangeByScore(S start, S end) {
    method zremrangeByScore (line 235) | private int zremrangeByScore(@Nonnull ScoreRangeSpec<S> spec) {
    method zremrangeByScore (line 245) | private int zremrangeByScore(@Nonnull ZScoreRangeSpec<S> spec) {
    method zpopFirst (line 258) | @Nullable
    method zpopLast (line 269) | @Nullable
    method zremByRank (line 280) | @Nullable
    method zremrangeByRank (line 302) | public int zremrangeByRank(int start, int end) {
    method zlimit (line 326) | public int zlimit(int count) {
    method zrevlimit (line 340) | public int zrevlimit(int count) {
    method zscore (line 357) | public S zscore(@Nonnull K member) {
    method zrank (line 372) | public int zrank(@Nonnull K member) {
    method zrevrank (line 392) | public int zrevrank(@Nonnull K member) {
    method zmemberByRank (line 407) | public Entry<K, S> zmemberByRank(int rank) {
    method zrevmemberByRank (line 422) | public Entry<K, S> zrevmemberByRank(int rank) {
    method zrangeByScore (line 440) | public List<Entry<K, S>> zrangeByScore(S start, S end) {
    method zrangeByScore (line 450) | public List<Entry<K, S>> zrangeByScore(ScoreRangeSpec<S> spec) {
    method zrevrangeByScore (line 461) | public List<Entry<K, S>> zrevrangeByScore(final S start, final S end) {
    method zrevrangeByScore (line 471) | public List<Entry<K, S>> zrevrangeByScore(ScoreRangeSpec<S> rangeSpec) {
    method zrangeByScoreWithOptions (line 484) | public List<Entry<K, S>> zrangeByScoreWithOptions(final ScoreRangeSpec...
    method zrangeByScoreWithOptions (line 497) | private List<Entry<K, S>> zrangeByScoreWithOptions(final ZScoreRangeSp...
    method zrangeByRank (line 562) | public List<Entry<K, S>> zrangeByRank(int start, int end) {
    method zrevrangeByRank (line 573) | public List<Entry<K, S>> zrevrangeByRank(int start, int end) {
    method zrangeByRankInternal (line 585) | private List<Entry<K, S>> zrangeByRankInternal(int start, int end, boo...
    method zcount (line 625) | public int zcount(S start, S end) {
    method zcount (line 635) | public int zcount(ScoreRangeSpec<S> rangeSpec) {
    method zcountInternal (line 645) | private int zcountInternal(final ZScoreRangeSpec<S> range) {
    method zcard (line 663) | public int zcard() {
    method zscan (line 676) | @Nonnull
    method zscan (line 687) | @Nonnull
    method iterator (line 700) | @Nonnull
    method fastzscan (line 713) | @Nonnull
    method fastIterator (line 732) | @Nonnull
    method dump (line 741) | public String dump() {
    class SkipList (line 754) | private static class SkipList<K, S> {
      method SkipList (line 793) | SkipList(Comparator<K> objComparator, ScoreHandler<S> scoreHandler) {
      method zslInsert (line 821) | @SuppressWarnings("UnusedReturnValue")
      method zslDelete (line 923) | @SuppressWarnings("UnusedReturnValue")
      method zslDeleteNode (line 964) | private void zslDeleteNode(final SkipListNode<K, S> deleteNode, fina...
      method zslIsInRange (line 1012) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method isScoreRangeEmpty (line 1038) | private boolean isScoreRangeEmpty(ZScoreRangeSpec<S> range) {
      method zslFirstInRange (line 1052) | @Nullable
      method zslLastInRange (line 1093) | @Nullable
      method zslDeleteRangeByScore (line 1135) | int zslDeleteRangeByScore(ZScoreRangeSpec<S> range, Map<K, S> dict) {
      method zslDeleteRangeByRank (line 1182) | int zslDeleteRangeByRank(int start, int end, Map<K, S> dict) {
      method zslDeleteByRank (line 1227) | SkipListNode<K, S> zslDeleteByRank(int rank, Map<K, S> dict) {
      method zslGetRank (line 1271) | int zslGetRank(S score, @Nonnull K obj) {
      method zslGetElementByRank (line 1300) | @Nullable
      method length (line 1323) | private int length() {
      method zslCreateNode (line 1335) | private static <K, S> SkipListNode<K, S> zslCreateNode(int level, S ...
      method sum (line 1346) | private S sum(S score1, S score2) {
      method newRangeSpec (line 1355) | private ZScoreRangeSpec<S> newRangeSpec(S start, S end) {
      method newRangeSpec (line 1363) | private ZScoreRangeSpec<S> newRangeSpec(ScoreRangeSpec<S> rangeSpec) {
      method newRangeSpec (line 1374) | private ZScoreRangeSpec<S> newRangeSpec(S start, boolean startEx, S ...
      method zslValueGteMin (line 1389) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method zslValueLteMax (line 1401) | boolean zslValueLteMax(S value, ZScoreRangeSpec<S> spec) {
      method compareScoreAndObj (line 1414) | private int compareScoreAndObj(SkipListNode<K, S> forward, S score, ...
      method compareObj (line 1427) | private int compareObj(@Nonnull K objA, @Nonnull K objB) {
      method objEquals (line 1437) | private boolean objEquals(K objA, K objB) {
      method compareScore (line 1447) | private int compareScore(S score1, S score2) {
      method scoreEquals (line 1457) | private boolean scoreEquals(S score1, S score2) {
      method dump (line 1466) | String dump() {
    class SkipListNode (line 1490) | private static class SkipListNode<K, S> implements Entry<K, S> {
      method SkipListNode (line 1512) | private SkipListNode(K obj, S score, SkipListLevel[] levelInfo) {
      method directForward (line 1522) | SkipListNode<K, S> directForward() {
      method getMember (line 1526) | @Override
      method getScore (line 1531) | @Override
    class SkipListLevel (line 1540) | private static class SkipListLevel<K, S> {
    class ZSetItr (line 1559) | private class ZSetItr implements Iterator<Entry<K, S>> {
      method ZSetItr (line 1565) | ZSetItr(SkipListNode<K, S> next) {
      method hasNext (line 1569) | @Override
      method next (line 1574) | @Override
      method nextMember (line 1588) | protected Entry<K, S> nextMember(SkipListNode<K, S> lastReturned) {
      method remove (line 1592) | @Override
      method checkForComodification (line 1609) | final void checkForComodification() {
    class FastZSetItr (line 1616) | private class FastZSetItr extends ZSetItr {
      method FastZSetItr (line 1618) | FastZSetItr(SkipListNode<K, S> next) {
      method nextMember (line 1622) | @Override
    class ZSetEntry (line 1629) | private static class ZSetEntry<K, S> implements Entry<K, S> {
      method ZSetEntry (line 1634) | ZSetEntry(K member, S score) {
      method getMember (line 1639) | @Override
      method getScore (line 1644) | @Override
      method toString (line 1649) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/ScoreHandler.java
  type ScoreHandler (line 34) | public interface ScoreHandler<T> extends Comparator<T> {
    method compare (line 43) | @Override
    method sum (line 53) | T sum(T oldScore, T increment);

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/ScoreHandlers.java
  class ScoreHandlers (line 26) | public class ScoreHandlers {
    method ScoreHandlers (line 28) | private ScoreHandlers() {
    method longScoreHandler (line 35) | public static ScoreHandler<Long> longScoreHandler() {
    method longScoreHandler (line 43) | public static ScoreHandler<Long> longScoreHandler(boolean desc) {
    class LongScoreHandler (line 50) | private static class LongScoreHandler implements ScoreHandler<Long> {
      method LongScoreHandler (line 54) | private LongScoreHandler() {
      method compare (line 58) | @Override
      method sum (line 63) | @Override
    class DescLongScoreHandler (line 72) | private static class DescLongScoreHandler implements ScoreHandler<Long> {
      method DescLongScoreHandler (line 76) | private DescLongScoreHandler() {
      method compare (line 80) | @Override
      method sum (line 86) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/ScoreRangeSpec.java
  class ScoreRangeSpec (line 26) | public class ScoreRangeSpec<S> {
    method ScoreRangeSpec (line 47) | public ScoreRangeSpec(S start, S end) {
    method ScoreRangeSpec (line 51) | public ScoreRangeSpec(S start, boolean startEx, S end, boolean endEx) {
    method getStart (line 59) | public S getStart() {
    method isStartEx (line 63) | public boolean isStartEx() {
    method getEnd (line 67) | public S getEnd() {
    method isEndEx (line 71) | public boolean isEndEx() {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/generic/ZScoreRangeSpec.java
  class ZScoreRangeSpec (line 6) | public class ZScoreRangeSpec<S> {
    method ZScoreRangeSpec (line 26) | public ZScoreRangeSpec(S min, boolean minex, S max, boolean maxex) {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/long2object/Long2ObjectEntry.java
  type Long2ObjectEntry (line 25) | public interface Long2ObjectEntry<S> extends Entry<Long, S> {
    method getMember (line 27) | @Deprecated
    method getLongMember (line 33) | long getLongMember();
    method getScore (line 35) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/long2object/Long2ObjectZSet.java
  class Long2ObjectZSet (line 65) | @NotThreadSafe
    method Long2ObjectZSet (line 74) | private Long2ObjectZSet(LongComparator objComparator, ScoreHandler<S> ...
    method newZSet (line 85) | public static <S> Long2ObjectZSet<S> newZSet(ScoreHandler<S> scoreHand...
    method newZSet (line 97) | public static <S> Long2ObjectZSet<S> newZSet(LongComparator objCompara...
    method zadd (line 109) | public void zadd(final S score, final long member) {
    method zaddnx (line 127) | public boolean zaddnx(final S score, final long member) {
    method zincrby (line 145) | public S zincrby(S increment, long member) {
    method zincrbyxx (line 161) | public S zincrbyxx(S increment, long member) {
    method zrem (line 181) | public S zrem(long member) {
    method zremrangeByScore (line 200) | public int zremrangeByScore(S start, S end) {
    method zremrangeByScore (line 210) | private int zremrangeByScore(@Nonnull ScoreRangeSpec<S> spec) {
    method zremrangeByScore (line 220) | private int zremrangeByScore(@Nonnull ZScoreRangeSpec<S> spec) {
    method zpopFirst (line 233) | @Nullable
    method zpopLast (line 244) | @Nullable
    method zremByRank (line 255) | @Nullable
    method zremrangeByRank (line 277) | public int zremrangeByRank(int start, int end) {
    method zlimit (line 301) | public int zlimit(int count) {
    method zrevlimit (line 315) | public int zrevlimit(int count) {
    method zscore (line 332) | public S zscore(long member) {
    method contain (line 337) | public boolean contain(long member) {
    method zrank (line 351) | public int zrank(long member) {
    method zrevrank (line 370) | public int zrevrank(long member) {
    method zmemberByRank (line 385) | public Long2ObjectEntry<S> zmemberByRank(int rank) {
    method zrevmemberByRank (line 400) | public Long2ObjectEntry<S> zrevmemberByRank(int rank) {
    method zrangeByScore (line 418) | public List<Long2ObjectEntry<S>> zrangeByScore(S start, S end) {
    method zrangeByScore (line 428) | public List<Long2ObjectEntry<S>> zrangeByScore(ScoreRangeSpec<S> spec) {
    method zrevrangeByScore (line 439) | public List<Long2ObjectEntry<S>> zrevrangeByScore(final S start, final...
    method zrevrangeByScore (line 449) | public List<Long2ObjectEntry<S>> zrevrangeByScore(ScoreRangeSpec<S> ra...
    method zrangeByScoreWithOptions (line 462) | public List<Long2ObjectEntry<S>> zrangeByScoreWithOptions(final ScoreR...
    method zrangeByScoreWithOptions (line 475) | private List<Long2ObjectEntry<S>> zrangeByScoreWithOptions(final ZScor...
    method zrangeByRank (line 540) | public List<Long2ObjectEntry<S>> zrangeByRank(int start, int end) {
    method zrevrangeByRank (line 551) | public List<Long2ObjectEntry<S>> zrevrangeByRank(int start, int end) {
    method zrangeByRankInternal (line 563) | private List<Long2ObjectEntry<S>> zrangeByRankInternal(int start, int ...
    method zcount (line 603) | public int zcount(S start, S end) {
    method zcount (line 613) | public int zcount(ScoreRangeSpec<S> rangeSpec) {
    method zcountInternal (line 623) | private int zcountInternal(final ZScoreRangeSpec<S> range) {
    method zcard (line 641) | public int zcard() {
    method zscan (line 654) | @Nonnull
    method zscan (line 665) | @Nonnull
    method iterator (line 678) | @Nonnull
    method fastzscan (line 691) | @Nonnull
    method fastIterator (line 708) | @Nonnull
    method dump (line 717) | public String dump() {
    class SkipList (line 730) | private static class SkipList<S> {
      method SkipList (line 770) | SkipList(LongComparator objComparator, ScoreHandler<S> scoreHandler) {
      method zslInsert (line 798) | @SuppressWarnings("UnusedReturnValue")
      method zslDelete (line 900) | @SuppressWarnings("UnusedReturnValue")
      method zslDeleteNode (line 941) | private void zslDeleteNode(final SkipListNode<S> deleteNode, final S...
      method zslIsInRange (line 989) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method isScoreRangeEmpty (line 1015) | private boolean isScoreRangeEmpty(ZScoreRangeSpec<S> range) {
      method zslFirstInRange (line 1029) | @Nullable
      method zslLastInRange (line 1070) | @Nullable
      method zslDeleteRangeByScore (line 1112) | int zslDeleteRangeByScore(ZScoreRangeSpec<S> range, Long2ObjectMap<S...
      method zslDeleteRangeByRank (line 1159) | int zslDeleteRangeByRank(int start, int end, Long2ObjectMap<S> dict) {
      method zslDeleteByRank (line 1204) | SkipListNode<S> zslDeleteByRank(int rank, Long2ObjectMap<S> dict) {
      method zslGetRank (line 1248) | int zslGetRank(S score, long obj) {
      method zslGetElementByRank (line 1277) | @Nullable
      method length (line 1300) | private int length() {
      method zslCreateNode (line 1312) | private static <S> SkipListNode<S> zslCreateNode(int level, S score,...
      method sum (line 1323) | private S sum(S score1, S score2) {
      method newRangeSpec (line 1332) | private ZScoreRangeSpec<S> newRangeSpec(S start, S end) {
      method newRangeSpec (line 1340) | private ZScoreRangeSpec<S> newRangeSpec(ScoreRangeSpec<S> rangeSpec) {
      method newRangeSpec (line 1351) | private ZScoreRangeSpec<S> newRangeSpec(S start, boolean startEx, S ...
      method zslValueGteMin (line 1366) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method zslValueLteMax (line 1378) | boolean zslValueLteMax(S value, ZScoreRangeSpec<S> spec) {
      method compareScoreAndObj (line 1391) | private int compareScoreAndObj(SkipListNode<S> forward, S score, lon...
      method compareObj (line 1404) | private int compareObj(long objA, long objB) {
      method objEquals (line 1414) | private boolean objEquals(long objA, long objB) {
      method compareScore (line 1424) | private int compareScore(S score1, S score2) {
      method scoreEquals (line 1434) | private boolean scoreEquals(S score1, S score2) {
      method dump (line 1443) | String dump() {
    class SkipListNode (line 1467) | private static class SkipListNode<S> implements Long2ObjectEntry<S> {
      method SkipListNode (line 1489) | private SkipListNode(long obj, S score, SkipListLevel[] levelInfo) {
      method directForward (line 1499) | SkipListNode<S> directForward() {
      method getLongMember (line 1503) | @Override
      method getScore (line 1508) | @Override
    class SkipListLevel (line 1517) | private static class SkipListLevel<S> {
    class ZSetItr (line 1536) | private class ZSetItr implements Iterator<Long2ObjectEntry<S>> {
      method ZSetItr (line 1542) | ZSetItr(SkipListNode<S> next) {
      method hasNext (line 1546) | @Override
      method next (line 1551) | @Override
      method nextMember (line 1565) | protected Long2ObjectEntry<S> nextMember(SkipListNode<S> lastReturne...
      method remove (line 1569) | @Override
      method checkForComodification (line 1586) | final void checkForComodification() {
    class FastZSetItr (line 1593) | private class FastZSetItr extends ZSetItr {
      method FastZSetItr (line 1595) | FastZSetItr(SkipListNode<S> next) {
      method nextMember (line 1599) | @Override
    class ZSetEntry (line 1606) | public static class ZSetEntry<S> implements Long2ObjectEntry<S> {
      method ZSetEntry (line 1611) | ZSetEntry(long member, S score) {
      method getLongMember (line 1616) | @Override
      method getScore (line 1621) | @Override
      method toString (line 1626) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/LongScoreHandler.java
  type LongScoreHandler (line 26) | public interface LongScoreHandler {
    method compare (line 37) | int compare(long score1, long score2);
    method sum (line 48) | long sum(long oldScore, long increment);

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/LongScoreHandlers.java
  class LongScoreHandlers (line 26) | public class LongScoreHandlers {
    method LongScoreHandlers (line 28) | private LongScoreHandlers() {
    method scoreHandler (line 35) | public static LongScoreHandler scoreHandler() {
    method scoreHandler (line 46) | public static LongScoreHandler scoreHandler(boolean desc) {
    class AscScoreHandler (line 53) | private static class AscScoreHandler implements LongScoreHandler {
      method compare (line 57) | @Override
      method sum (line 62) | @Override
    class DescScoreHandler (line 71) | private static class DescScoreHandler implements LongScoreHandler {
      method compare (line 75) | @Override
      method sum (line 80) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/LongScoreRangeSpec.java
  class LongScoreRangeSpec (line 26) | public class LongScoreRangeSpec {
    method LongScoreRangeSpec (line 47) | public LongScoreRangeSpec(long start, long end) {
    method LongScoreRangeSpec (line 51) | public LongScoreRangeSpec(long start, boolean startEx, long end, boole...
    method getStart (line 59) | public long getStart() {
    method isStartEx (line 63) | public boolean isStartEx() {
    method getEnd (line 67) | public long getEnd() {
    method isEndEx (line 71) | public boolean isEndEx() {

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/Object2LongEntry.java
  type Object2LongEntry (line 22) | public interface Object2LongEntry<K> extends Entry<K, Long> {
    method getMember (line 24) | @Override
    method getLongScore (line 27) | long getLongScore();
    method getScore (line 29) | @Deprecated

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/Object2LongZSet.java
  class Object2LongZSet (line 60) | @NotThreadSafe
    method Object2LongZSet (line 69) | private Object2LongZSet(Comparator<K> keyComparator, LongScoreHandler ...
    method newStringKeyZSet (line 79) | public static Object2LongZSet<String> newStringKeyZSet(LongScoreHandle...
    method newLongKeyZSet (line 89) | public static Object2LongZSet<Long> newLongKeyZSet(LongScoreHandler sc...
    method newIntKeyZSet (line 99) | public static Object2LongZSet<Integer> newIntKeyZSet(LongScoreHandler ...
    method newGenericKeyZSet (line 112) | public static <K> Object2LongZSet<K> newGenericKeyZSet(Comparator<K> k...
    method zadd (line 124) | public void zadd(final long score, @Nonnull final K member) {
    method zaddnx (line 142) | public boolean zaddnx(final long score, @Nonnull final K member) {
    method zincrby (line 160) | public long zincrby(long increment, @Nonnull K member) {
    method zincrbyxx (line 176) | public long zincrbyxx(long increment, @Nonnull K member) {
    method zrem (line 196) | public Long zrem(@Nonnull K member) {
    method zremrangeByScore (line 216) | public int zremrangeByScore(long start, long end) {
    method zremrangeByScore (line 226) | private int zremrangeByScore(@Nonnull LongScoreRangeSpec spec) {
    method zremrangeByScore (line 236) | private int zremrangeByScore(@Nonnull ZLongScoreRangeSpec spec) {
    method zpopFirst (line 250) | @Nullable
    method zpopLast (line 261) | @Nullable
    method zremByRank (line 272) | @Nullable
    method zremrangeByRank (line 294) | public int zremrangeByRank(int start, int end) {
    method zlimit (line 318) | public int zlimit(int count) {
    method zrevlimit (line 332) | public int zrevlimit(int count) {
    method zscore (line 349) | public Long zscore(@Nonnull K member) {
    method zrank (line 364) | public int zrank(@Nonnull K member) {
    method zrevrank (line 384) | public int zrevrank(@Nonnull K member) {
    method zmemberByRank (line 400) | public Object2LongEntry<K> zmemberByRank(int rank) {
    method zrevmemberByRank (line 415) | public Object2LongEntry<K> zrevmemberByRank(int rank) {
    method zrangeByScore (line 433) | public List<Object2LongEntry<K>> zrangeByScore(long start, long end) {
    method zrangeByScore (line 443) | public List<Object2LongEntry<K>> zrangeByScore(LongScoreRangeSpec spec) {
    method zrevrangeByScore (line 454) | public List<Object2LongEntry<K>> zrevrangeByScore(final long start, fi...
    method zrevrangeByScore (line 464) | public List<Object2LongEntry<K>> zrevrangeByScore(LongScoreRangeSpec r...
    method zrangeByScoreWithOptions (line 477) | public List<Object2LongEntry<K>> zrangeByScoreWithOptions(final LongSc...
    method zrangeByScoreWithOptions (line 490) | private List<Object2LongEntry<K>> zrangeByScoreWithOptions(final ZLong...
    method zrangeByRank (line 555) | public List<Object2LongEntry<K>> zrangeByRank(int start, int end) {
    method zrevrangeByRank (line 566) | public List<Object2LongEntry<K>> zrevrangeByRank(int start, int end) {
    method zrangeByRankInternal (line 578) | private List<Object2LongEntry<K>> zrangeByRankInternal(int start, int ...
    method zcount (line 617) | public int zcount(long start, long end) {
    method zcount (line 627) | public int zcount(LongScoreRangeSpec rangeSpec) {
    method zcountInternal (line 637) | private int zcountInternal(final ZLongScoreRangeSpec range) {
    method zcard (line 655) | public int zcard() {
    method zscan (line 668) | @Nonnull
    method zscan (line 679) | @Nonnull
    method iterator (line 692) | @Nonnull
    method fastzscan (line 705) | @Nonnull
    method fastIterator (line 722) | @Nonnull
    method dump (line 731) | public String dump() {
    class SkipList (line 745) | private static class SkipList<K> {
      method SkipList (line 785) | SkipList(Comparator<K> objComparator, LongScoreHandler scoreHandler) {
      method zslInsert (line 813) | @SuppressWarnings("UnusedReturnValue")
      method zslDelete (line 915) | @SuppressWarnings("UnusedReturnValue")
      method zslDeleteNode (line 956) | private void zslDeleteNode(final SkipListNode<K> deleteNode, final S...
      method zslIsInRange (line 1004) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method isScoreRangeEmpty (line 1030) | private boolean isScoreRangeEmpty(ZLongScoreRangeSpec range) {
      method zslFirstInRange (line 1044) | @Nullable
      method zslLastInRange (line 1085) | @Nullable
      method zslDeleteRangeByScore (line 1127) | int zslDeleteRangeByScore(ZLongScoreRangeSpec range, Map<K, Long> di...
      method zslDeleteRangeByRank (line 1173) | int zslDeleteRangeByRank(int start, int end, Map<K, Long> dict) {
      method zslDeleteByRank (line 1218) | SkipListNode<K> zslDeleteByRank(int rank, Map<K, Long> dict) {
      method zslGetRank (line 1263) | int zslGetRank(long score, @Nonnull K obj) {
      method zslGetElementByRank (line 1292) | @Nullable
      method length (line 1315) | private int length() {
      method zslCreateNode (line 1327) | private static <K> SkipListNode<K> zslCreateNode(int level, long sco...
      method sum (line 1338) | private long sum(long score1, long score2) {
      method newRangeSpec (line 1347) | private ZLongScoreRangeSpec newRangeSpec(long start, long end) {
      method newRangeSpec (line 1355) | private ZLongScoreRangeSpec newRangeSpec(LongScoreRangeSpec rangeSpe...
      method newRangeSpec (line 1366) | private ZLongScoreRangeSpec newRangeSpec(long start, boolean startEx...
      method zslValueGteMin (line 1381) | @SuppressWarnings("BooleanMethodIsAlwaysInverted")
      method zslValueLteMax (line 1393) | boolean zslValueLteMax(long value, ZLongScoreRangeSpec spec) {
      method compareScoreAndObj (line 1405) | private int compareScoreAndObj(SkipListNode<K> forward, long score, ...
      method compareObj (line 1417) | private int compareObj(@Nonnull K objA, @Nonnull K objB) {
      method objEquals (line 1428) | private boolean objEquals(K objA, K objB) {
      method compareScore (line 1438) | private int compareScore(long score1, long score2) {
      method scoreEquals (line 1448) | private boolean scoreEquals(long score1, long score2) {
      method dump (line 1457) | String dump() {
    class SkipListNode (line 1482) | private static class SkipListNode<K> implements Object2LongEntry<K> {
      method SkipListNode (line 1504) | private SkipListNode(K obj, long score, SkipListLevel[] levelInfo) {
      method directForward (line 1514) | SkipListNode<K> directForward() {
      method getMember (line 1518) | @Override
      method getLongScore (line 1523) | @Override
    class SkipListLevel (line 1532) | private static class SkipListLevel<K> {
    class ZSetItr (line 1551) | private class ZSetItr implements Iterator<Object2LongEntry<K>> {
      method ZSetItr (line 1557) | ZSetItr(SkipListNode<K> next) {
      method hasNext (line 1561) | @Override
      method next (line 1566) | @Override
      method nextMember (line 1580) | protected Object2LongEntry<K> nextMember(SkipListNode<K> lastReturne...
      method remove (line 1584) | @Override
      method checkForComodification (line 1601) | final void checkForComodification() {
    class FastZSetItr (line 1608) | private class FastZSetItr extends ZSetItr {
      method FastZSetItr (line 1610) | FastZSetItr(SkipListNode<K> next) {
      method nextMember (line 1614) | @Override
    class ZSetEntry (line 1621) | public static class ZSetEntry<K> implements Object2LongEntry<K> {
      method ZSetEntry (line 1627) | ZSetEntry(K member, long score) {
      method getMember (line 1632) | @Override
      method getLongScore (line 1637) | @Override
      method toString (line 1642) | @Override

FILE: gamioo-redis/src/main/java/io/gamioo/redis/zset/object2long/ZLongScoreRangeSpec.java
  class ZLongScoreRangeSpec (line 6) | public final class ZLongScoreRangeSpec {
    method ZLongScoreRangeSpec (line 26) | public ZLongScoreRangeSpec(long min, boolean minex, long max, boolean ...

FILE: gamioo-redis/src/test/java/io/gamioo/redis/zset/generic/GenericZSetTest.java
  class GenericZSetTest (line 14) | public class GenericZSetTest {
    method main (line 16) | public static void main(String[] args) {
    method randomScore (line 34) | private static ComplexScore randomScore() {
    class ComplexScore (line 40) | private static class ComplexScore {
      method ComplexScore (line 46) | ComplexScore(int vipLevel, int level, long timeStamp) {
      method getLevel (line 52) | public int getLevel() {
      method getVipLevel (line 56) | public int getVipLevel() {
      method getTimestamp (line 60) | public long getTimestamp() {
      method toString (line 64) | @Override
    class ComplexScoreHandler (line 74) | private static class ComplexScoreHandler implements ScoreHandler<Compl...
      method compare (line 76) | @Override
      method sum (line 92) | @Override

FILE: gamioo-redis/src/test/java/io/gamioo/redis/zset/long2object/Long2ObjectZSetTest.java
  class Long2ObjectZSetTest (line 16) | public class Long2ObjectZSetTest {
    method main (line 18) | public static void main(String[] args) {
    method randomScore (line 36) | private static ComplexScore randomScore() {
    class ComplexScore (line 42) | private static class ComplexScore {
      method ComplexScore (line 48) | ComplexScore(int vipLevel, int level, long timeStamp) {
      method getLevel (line 54) | public int getLevel() {
      method getVipLevel (line 58) | public int getVipLevel() {
      method getTimestamp (line 62) | public long getTimestamp() {
      method toString (line 66) | @Override
    class ComplexScoreHandler (line 76) | private static class ComplexScoreHandler implements ScoreHandler<Compl...
      method compare (line 78) | @Override
      method sum (line 94) | @Override

FILE: gamioo-redis/src/test/java/io/gamioo/redis/zset/object2long/Object2LongZSetTest.java
  class Object2LongZSetTest (line 15) | public class Object2LongZSetTest {
    method main (line 19) | public static void main(String[] args) {
    method randomScore (line 37) | private static long randomScore() {
    method composeToLong (line 42) | private static long composeToLong(int a, int b) {
    method vipLevel (line 46) | private static int vipLevel(long score) {
    method level (line 50) | private static int level(long score) {
    class ComplexScoreHandler (line 54) | private static class ComplexScoreHandler implements LongScoreHandler {
      method compare (line 56) | @Override
      method sum (line 67) | @Override

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/AsymmetricBenchMark.java
  class AsymmetricBenchMark (line 18) | @Fork(1)
    method up (line 27) | @Setup
    method inc (line 32) | @Benchmark
    method get (line 39) | @Benchmark
    method main (line 46) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/InterruptBenchmark.java
  class InterruptBenchmark (line 20) | @Fork(1)
    method init (line 29) | @Setup
    method put (line 34) | @GroupThreads(5)
    method take (line 44) | @GroupThreads(5)
    method main (line 54) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/MapBenchMark.java
  class MapBenchMark (line 22) | @Fork(1)
    method setUp (line 35) | @Setup
    method putMap (line 56) | @Group("map")
    method getMap (line 64) | @Group("map")
    method randomIntValue (line 76) | private int randomIntValue() {
    method main (line 80) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/ProtoDeserializeBenchMark.java
  class ProtoDeserializeBenchMark (line 29) | @Fork(1)
    method init (line 52) | @Setup
    method furyDeserialize (line 80) | @Benchmark
    method jsonDeserialize (line 85) | @Benchmark
    method jsonDeserializeWithArrayToBean (line 90) | @Benchmark
    method jsonDeserializeWithArrayToBeanAndFieldBase (line 96) | @Benchmark
    method furyDeserializeWithClassRegistrationAndNumberCompressed (line 101) | @Benchmark
    method protostuffDeserialize (line 106) | @Benchmark
    method main (line 112) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/ProtoSerializeBenchMark.java
  class ProtoSerializeBenchMark (line 28) | @Fork(1)
    method init (line 42) | @Setup
    method furySerialize (line 63) | @Benchmark
    method furySerializeWithClassRegistrationAndNumberCompressed (line 67) | @Benchmark
    method jsonSerialize (line 71) | @Benchmark
    method jsonSerializeWithBeanToArray (line 78) | @Benchmark
    method jsonSerializeWithBeanToArrayAndFieldBase (line 83) | @Benchmark
    method protostuffSerialize (line 87) | @Benchmark
    method main (line 95) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/jmh/java/io/gamioo/sandbox/SymmetricBenchmark.java
  class SymmetricBenchmark (line 18) | @BenchmarkMode(Mode.AverageTime)
    method init (line 27) | @Setup
    method inc (line 32) | @GroupThreads(5)
    method get (line 39) | @GroupThreads(5)
    method main (line 46) | public static void main(String[] args) throws RunnerException {

FILE: gamioo-sandbox/src/main/java/io/gamioo/sandbox/HarmDTO.java
  class HarmDTO (line 10) | public class HarmDTO {
    method getTargetId (line 26) | public Long getTargetId() {
    method setTargetId (line 30) | public void setTargetId(Long targetId) {
    method getType (line 34) | public int getType() {
    method setType (line 38) | public void setType(int type) {
    method getValue (line 42) | public float getValue() {
    method setValue (line 46) | public void setValue(float value) {
    method isDead (line 50) | public boolean isDead() {
    method setDead (line 54) | public void setDead(boolean dead) {
    method getReal (line 58) | public long getReal() {
    method setReal (line 62) | public void setReal(long real) {
    method getMaxHp (line 66) | public float getMaxHp() {
    method setMaxHp (line 70) | public void setMaxHp(float maxHp) {
    method getCurHp (line 74) | public float getCurHp() {
    method setCurHp (line 78) | public void setCurHp(float curHp) {
    method toString (line 82) | @Override

FILE: gamioo-sandbox/src/main/java/io/gamioo/sandbox/LoginGame_S2C_Msg.java
  class LoginGame_S2C_Msg (line 6) | public class LoginGame_S2C_Msg {

FILE: gamioo-sandbox/src/main/java/io/gamioo/sandbox/SerializingUtil.java
  class SerializingUtil (line 11) | public class SerializingUtil {
    method serialize (line 20) | public static <T> byte[] serialize(T source) {
    method deserialize (line 47) | public static <T> T deserialize(byte[] source, Class<T> typeClass) {

FILE: gamioo-sandbox/src/main/java/io/gamioo/sandbox/SkillCategory.java
  type SkillCategory (line 7) | public enum SkillCategory {
    method SkillCategory (line 18) | SkillCategory(int id, String message) {
    method getId (line 24) | public int getId() {
    method getMessage (line 28) | public String getMessage() {

FILE: gamioo-sandbox/src/main/java/io/gamioo/sandbox/SkillFire_S2C_Msg.java
  class SkillFire_S2C_Msg (line 16) | public class SkillFire_S2C_Msg {
    method getAttackerId (line 37) | public Long getAttackerId() {
    method setAttackerId (line 41) | public void setAttackerId(Long attackerId) {
    method getSkillCategory (line 45) | public SkillCategory getSkillCategory() {
    method setSkillCategory (line 49) | public void setSkillCategory(SkillCategory skillCategory) {
    method getIndex (line 53) | public int getIndex() {
    method setIndex (line 57) | public void setIndex(int index) {
    method getHarmList (line 61) | public List<HarmDTO> getHarmList() {
    method setHarmList (line 65) | public void setHarmList(List<HarmDTO> harmList) {
    method getParam1 (line 69) | public List<Long> getParam1() {
    method setParam1 (line 73) | public void setParam1(List<Long> param1) {
    method toString (line 77) | @Override

FILE: gamioo-sandbox/src/test/java/io/gamioo/sandbox/AnsibleTest.java
  class AnsibleTest (line 15) | @DisplayName("crypto test")
    method beforeAll (line 22) | @BeforeAll
    method afterAll (line 31) | @AfterAll
    method ssh (line 36) | @DisplayName("ssh")

FILE: gamioo-sandbox/src/test/java/io/gamioo/sandbox/Base64Test.java
  class Base64Test (line 17) | @DisplayName("crypto test")
    method beforeAll (line 23) | @BeforeAll
    method afterAll (line 29) | @AfterAll
    method base64 (line 34) | @DisplayName("base64")

FILE: gamioo-sandbox/src/test/java/io/gamioo/sandbox/BitMapTest.java
  class BitMapTest (line 10) | @DisplayName("BitMap test")
    method beforeAll (line 16) | @BeforeAll
    method afterAll (line 20) | @AfterAll
    method nativeFind (line 25) | @DisplayName("bitmap")

FILE: gamioo-sandbox/src/test/java/io/gamioo/sandbox/CryptoTest.java
  class CryptoTest (line 10) | @DisplayName("crypto test")
    method beforeAll (line 16) | @BeforeAll
    method afterAll (line 20) | @AfterAll
    method bCrypt (line 25) | @DisplayName("bCrypt")

FILE: gamioo-sandbox/src/test/java/io/gamioo/sandbox/ProtoTest.java
  class ProtoTest (line 22) | @DisplayName("proto test")
    method beforeAll (line 33) | @BeforeAll
    method afterAll (line 51) | @AfterAll
    method handleJson2Serialize (line 56) | @DisplayName("Json2 Serializable")
    method handleJson2WithBeanToArraySerialize (line 67) | @DisplayName("Json2 Serializable with BeanToArray")
    method handleJson2WithBeanToArrayAndFieldBasedSerialize (line 77) | @DisplayName("Json2 Serializable with beanToArray and fieldBased")
    method handleFurySerialize (line 114) | @DisplayName("Fury Serializable")
    method handleFurySerializeWithCompress (line 126) | @DisplayName("Fury Serializable with Number Compress")
    method handleFurySerializeWithCompressAndRefTrackingClose (line 140) | @DisplayName("Fury Serializable with Number Compress and RefTracking c...
    method handleFurySerializeWithCompressAndRefTrackingCloseAndRegister (line 154) | @DisplayName("Fury Serializable with Number Compress and RefTracking c...
    method handleFurySerializeWithCompressAndRegister (line 171) | @DisplayName("Fury Serializable with Number Compress and class register")
    method handleFuryDeserialize (line 189) | @DisplayName("Fury Deserialize")
    method handleProtostuffSerialize (line 196) | @DisplayName("Protostuff Serializable")
    method handleProtostuffDeserialize (line 206) | @DisplayName("Protostuff Deserialize")
Condensed preview — 272 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (847K chars).
[
  {
    "path": ".gitattributes",
    "chars": 154,
    "preview": "#\n# https://help.github.com/articles/dealing-with-line-endings/\n#\n# These are explicitly windows files and should use cr"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 803,
    "preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
  },
  {
    "path": ".github/workflows/gradle-publish.yml",
    "chars": 1542,
    "preview": "# This workflow uses actions that are not certified by GitHub.\n# They are provided by a third-party and are governed by\n"
  },
  {
    "path": ".github/workflows/gradle.yml",
    "chars": 1531,
    "preview": "# This workflow uses actions that are not certified by GitHub.\n# They are provided by a third-party and are governed by\n"
  },
  {
    "path": ".gitignore",
    "chars": 1208,
    "preview": "# Ignore Gradle project-specific cache directory\n.gradle\n\n# Ignore Gradle build output directory\nbuild\n/.project\n/gamioo"
  },
  {
    "path": ".settings/.gitignore",
    "chars": 34,
    "preview": "/org.eclipse.buildship.core.prefs\n"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.en-US.md",
    "chars": 3239,
    "preview": "<p align=\"center\">\n  <img src=\"https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png\" width=\"100\">\n</p>\n<p al"
  },
  {
    "path": "README.md",
    "chars": 1949,
    "preview": "<p align=\"center\">\n  <img src=\"https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png\" width=\"100\">\n</p>\n<p al"
  },
  {
    "path": "_config.yml",
    "chars": 29,
    "preview": "theme: jekyll-theme-architect"
  },
  {
    "path": "build.gradle",
    "chars": 9502,
    "preview": "def releaseTime;\ndef times;\next {\n    Properties properties = new Properties()\n    String fileName = \"version.properties"
  },
  {
    "path": "docs/_config.yml",
    "chars": 29,
    "preview": "theme: jekyll-theme-architect"
  },
  {
    "path": "docs/index.md",
    "chars": 1402,
    "preview": "<p align=\"center\">\n  <img src=\"https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png\" width=\"100\">\n</p>\n## We"
  },
  {
    "path": "gamioo-cache/README.md",
    "chars": 2806,
    "preview": "<p align=\"center\">\n  <img src=\"https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png\" width=\"100\">\n</p>\n<p al"
  },
  {
    "path": "gamioo-cache/build.gradle",
    "chars": 278,
    "preview": "dependencies {\n    api project(':gamioo-log');\n    api group: 'com.github.ben-manes.caffeine', name: 'caffeine', version"
  },
  {
    "path": "gamioo-cache/src/jmh/java/io/gamioo/cache/CacheBenchMark.java",
    "chars": 2515,
    "preview": "package io.gamioo.cache;\n\n\nimport com.github.benmanes.caffeine.cache.Caffeine;\nimport com.google.common.cache.CacheBuild"
  },
  {
    "path": "gamioo-common/build.gradle",
    "chars": 1641,
    "preview": "dependencies {\n    api project(':gamioo-log');\n    api group: 'com.google.guava', name: 'guava', version: '31.1-jre';\n  "
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/concurrent/Group.java",
    "chars": 1189,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/concurrent/NameableThreadFactory.java",
    "chars": 983,
    "preview": "package io.gamioo.common.concurrent;\n\nimport java.util.concurrent.ThreadFactory;\nimport java.util.concurrent.atomic.Atom"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/constant/CacheConstant.java",
    "chars": 150,
    "preview": "package io.gamioo.common.constant;\n\n/**\n * @author Allen Jiang\n */\npublic class CacheConstant {\n    public static final "
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/constant/Describe.java",
    "chars": 352,
    "preview": "package io.gamioo.common.constant;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimpo"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/constant/ModuleConstant.java",
    "chars": 1175,
    "preview": "package io.gamioo.common.constant;\n\nimport org.apache.commons.collections4.CollectionUtils;\n\nimport java.lang.reflect.Fi"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/constant/SystemConstant.java",
    "chars": 2190,
    "preview": "package io.gamioo.common.constant;\n\n/**\n * @author Allen Jiang\n */\npublic class SystemConstant {\n    // 服务器类型\n    /**\n  "
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/constant/TimeConstant.java",
    "chars": 615,
    "preview": "package io.gamioo.common.constant;\n\nimport java.util.Date;\n\npublic class TimeConstant {\n    /**\n     * 2020-01-01 00:00:"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/BeansException.java",
    "chars": 782,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/NestedIOException.java",
    "chars": 1873,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicFieldException.java",
    "chars": 534,
    "preview": "package io.gamioo.common.exception;\n\n/**\n * 在找不到指定Public属性时抛出.\n *\n * @author 小流氓[176543888@qq.com]\n * @since 3.3.6\n */\np"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/NoPublicMethodException.java",
    "chars": 928,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/ServerBootstrapException.java",
    "chars": 1134,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/exception/ServiceException.java",
    "chars": 884,
    "preview": "package io.gamioo.common.exception;\n\nimport io.gamioo.common.util.StringUtils;\n\n/**\n * 框架异常类\n *\n * @author Allen Jiang\n "
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/http/RequestMethod.java",
    "chars": 795,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/lang/Cache.java",
    "chars": 1398,
    "preview": "package io.gamioo.common.lang;\n\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/lang/Server.java",
    "chars": 2783,
    "preview": "package io.gamioo.common.lang;\n\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/lang/ServerInfo.java",
    "chars": 950,
    "preview": "package io.gamioo.common.lang;\n\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/shape/AABB.java",
    "chars": 1434,
    "preview": "package io.gamioo.common.shape;\n\n/**\n * @author Allen Jiang\n */\npublic class AABB implements Shape {\n    private final i"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/shape/Point.java",
    "chars": 4498,
    "preview": "package io.gamioo.common.shape;\n\n\nimport io.gamioo.common.vector.Vector2f;\n\npublic class Point implements Shape {\n\n    p"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/shape/Sector.java",
    "chars": 5299,
    "preview": "package io.gamioo.common.shape;\n\nimport io.gamioo.common.util.MathUtils;\nimport io.gamioo.common.vector.Vector2f;\nimport"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/shape/Shape.java",
    "chars": 378,
    "preview": "package io.gamioo.common.shape;\n\n\npublic interface Shape {\n    /**\n     * 是否包含指定的点\n     *\n     * @param x 点x\n     * @par"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/AnnotationUtils.java",
    "chars": 1555,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/ArrayUtils.java",
    "chars": 6969,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/Assert.java",
    "chars": 16639,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/ByteArrayUtils.java",
    "chars": 1603,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/CharsetUtils.java",
    "chars": 1314,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/ClassUtils.java",
    "chars": 4674,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/FieldUtils.java",
    "chars": 6826,
    "preview": "package io.gamioo.common.util;\n\nimport io.gamioo.common.exception.NoPublicFieldException;\nimport io.gamioo.common.except"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/FileUtils.java",
    "chars": 11956,
    "preview": "package io.gamioo.common.util;\n\nimport org.apache.commons.io.Charsets;\nimport org.apache.commons.io.IOUtils;\nimport org."
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/JSONUtils.java",
    "chars": 585,
    "preview": "package io.gamioo.common.util;\n\nimport com.alibaba.fastjson2.JSONObject;\nimport io.gamioo.common.exception.ServiceExcept"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/JVMUtil.java",
    "chars": 364,
    "preview": "package io.gamioo.common.util;\n\nimport java.lang.management.ManagementFactory;\nimport java.util.List;\n\n/**\n * @author Al"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/JsonXmlUtil.java",
    "chars": 7748,
    "preview": "package io.gamioo.common.util;\n\nimport com.alibaba.fastjson2.JSONArray;\nimport com.alibaba.fastjson2.JSONObject;\nimport "
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/MathUtils.java",
    "chars": 11720,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/MethodUtils.java",
    "chars": 3006,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/NativeUtils.java",
    "chars": 1006,
    "preview": "package io.gamioo.common.util;\n\n\nimport org.apache.commons.lang3.SystemUtils;\n\nimport java.io.*;\n\n/**\n * 用于加载native dll的"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/RandomUtils.java",
    "chars": 8883,
    "preview": "/*\n * Copyright 2015-2020 gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/ResourceUtils.java",
    "chars": 13716,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/StringUtils.java",
    "chars": 26933,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/TelnetUtils.java",
    "chars": 2632,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/ThreadUtils.java",
    "chars": 1987,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/util/XMLUtil.java",
    "chars": 7314,
    "preview": "package io.gamioo.common.util;\n\nimport io.gamioo.common.exception.ServiceException;\nimport org.dom4j.Document;\nimport or"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/vector/Vector2f.java",
    "chars": 4706,
    "preview": "package io.gamioo.common.vector;\n\nimport io.gamioo.common.shape.Point;\n\n\n/**\n * @author Allen Jiang\n */\npublic class Vec"
  },
  {
    "path": "gamioo-common/src/main/java/io/gamioo/common/vector/Vector3f.java",
    "chars": 663,
    "preview": "package io.gamioo.common.vector;\n\n/**\n * 向量\n *\n * @author Allen Jiang\n */\npublic class Vector3f implements Cloneable {\n "
  },
  {
    "path": "gamioo-common/src/test/java/io/gamioo/JsonXmlUtilTest.java",
    "chars": 1213,
    "preview": "package io.gamioo;\n\nimport com.alibaba.fastjson2.JSONObject;\nimport io.gamioo.common.util.JsonXmlUtil;\nimport io.gamioo."
  },
  {
    "path": "gamioo-common/src/test/java/io/gamioo/MainT.java",
    "chars": 493,
    "preview": "package io.gamioo;\n\nimport org.apache.logging.log4j.LogManager;\nimport org.apache.logging.log4j.Logger;\n\nimport java.uti"
  },
  {
    "path": "gamioo-common/src/test/resources/gate-config.xml",
    "chars": 1164,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- id:  platformId: 联运平台  ; maxConcurrentUser: 允许同时最高在线  maxRegisterUser: 允许最多注"
  },
  {
    "path": "gamioo-common/src/test/resources/junit-platform.properties",
    "chars": 452,
    "preview": "junit.jupiter.execution.parallel.enabled=true\n#\\u7c7b\\u5185\\u90e8\\u65b9\\u6cd5\\u5e76\\u884c\njunit.jupiter.execution.parall"
  },
  {
    "path": "gamioo-common/src/test/resources/log4j2.component.properties",
    "chars": 146,
    "preview": "Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\n# default values is 256*1024\nAsyncLo"
  },
  {
    "path": "gamioo-common/src/test/resources/log4j2.xml",
    "chars": 2187,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- status=debug 可 以查看log4j的装配过程级别有8个  ALL,TRACE, DEBUG, INFO, WARN, ERROR ,FATA"
  },
  {
    "path": "gamioo-compress/README.md",
    "chars": 3803,
    "preview": "<p align=\"center\">\n  <img src=\"https://img-blog.csdnimg.cn/0a3678d0638342039887166f68c8d995.png\" width=\"100\">\n</p>\n<p al"
  },
  {
    "path": "gamioo-compress/build.gradle",
    "chars": 432,
    "preview": "dependencies {\n    api project(':gamioo-common');\n    api group: 'com.github.luben', name: 'zstd-jni', version: '1.5.4-2"
  },
  {
    "path": "gamioo-compress/src/jmh/java/io/gamioo/compress/CompressBenchMark.java",
    "chars": 2650,
    "preview": "package io.gamioo.compress;\n\n\nimport com.github.luben.zstd.Zstd;\nimport io.gamioo.common.util.FileUtils;\nimport org.apac"
  },
  {
    "path": "gamioo-compress/src/jmh/java/io/gamioo/compress/SimilarityBenchMark.java",
    "chars": 2465,
    "preview": "package io.gamioo.compress;\n\n\nimport info.debatty.java.stringsimilarity.Jaccard;\nimport info.debatty.java.stringsimilari"
  },
  {
    "path": "gamioo-compress/src/jmh/resources/message.txt",
    "chars": 972,
    "preview": "{code {\n  flag: 1\n  id: 1\n}\ntableId: 936940\nownerId: 143566\ncreateId: 143566\nroomTemplateId: 4\nconfigTemplateId: 1101\nen"
  },
  {
    "path": "gamioo-compress/src/jmh/resources/mini.txt",
    "chars": 119,
    "preview": "{code {\n  flag: 1\n  id: 1\n}\ntableId: 936940\nownerId: 143566\ncreateId: 143566\nroomTemplateId: 4\nconfigTemplateId: 1101\n}"
  },
  {
    "path": "gamioo-compress/src/jmh/resources/readu.txt",
    "chars": 6050,
    "preview": "我不是一个聪明的人,也不算是一个优秀的学生。然而现在已在窗明几净的实验室里跟着导师忙碌地做课题了。偶尔也会掀起窗帘看看外面的风景,看到学弟学妹们因考研而紧张又[猪批]忙碌的身影,除了庆幸自己已站在了这里外,也不免想起去年那段日子,我也是那楼"
  },
  {
    "path": "gamioo-compress/src/jmh/resources/short.txt",
    "chars": 398,
    "preview": "{code {\n  flag: 1\n  id: 1\n}\ntableId: 936940\nownerId: 143566\ncreateId: 143566\nroomTemplateId: 4\nconfigTemplateId: 1101\nen"
  },
  {
    "path": "gamioo-compress/src/main/java/io/gamioo/compress/Main.java",
    "chars": 501,
    "preview": "package io.gamioo.compress;\n\nimport io.gamioo.common.util.FileUtils;\nimport org.apache.logging.log4j.LogManager;\nimport "
  },
  {
    "path": "gamioo-compress/src/main/java/io/gamioo/compress/ZlibUtil.java",
    "chars": 2321,
    "preview": "package io.gamioo.compress;\n\nimport io.gamioo.common.exception.ServiceException;\nimport org.apache.logging.log4j.LogMana"
  },
  {
    "path": "gamioo-compress/src/main/resources/message.txt",
    "chars": 972,
    "preview": "{code {\n  flag: 1\n  id: 1\n}\ntableId: 936940\nownerId: 143566\ncreateId: 143566\nroomTemplateId: 4\nconfigTemplateId: 1101\nen"
  },
  {
    "path": "gamioo-config/build.gradle",
    "chars": 331,
    "preview": "dependencies {\n    implementation project(':gamioo-common');\n    implementation project(':gamioo-network');\n    implemen"
  },
  {
    "path": "gamioo-config/src/main/java/io/gamioo/config/NacosUtil.java",
    "chars": 2603,
    "preview": "package io.gamioo.config;\n\n\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService"
  },
  {
    "path": "gamioo-config/src/main/java/io/gamioo/config/ServerConfig.java",
    "chars": 4906,
    "preview": "package io.gamioo.config;\n\n\nimport com.alibaba.fastjson2.JSON;\nimport io.gamioo.common.lang.Cache;\nimport io.gamioo.comm"
  },
  {
    "path": "gamioo-config/src/main/java/io/gamioo/config/ServerConfigManager.java",
    "chars": 5770,
    "preview": "package io.gamioo.config;\n\n\nimport io.gamioo.common.exception.ServiceException;\nimport io.gamioo.common.lang.Cache;\nimpo"
  },
  {
    "path": "gamioo-event/.settings/.gitignore",
    "chars": 34,
    "preview": "/org.eclipse.buildship.core.prefs\n"
  },
  {
    "path": "gamioo-event/build.gradle",
    "chars": 63,
    "preview": "dependencies {\n    implementation project(':gamioo-common');\n\n}"
  },
  {
    "path": "gamioo-event/src/main/java/io/gamioo/event/EventService.java",
    "chars": 87,
    "preview": "package io.gamioo.event;\n\n/**\n * @author Allen Jiang\n */\npublic class EventService {\n}\n"
  },
  {
    "path": "gamioo-event/src/main/java/io/gamioo/event/package-info.java",
    "chars": 24,
    "preview": "package io.gamioo.event;"
  },
  {
    "path": "gamioo-event/src/test/java/io/gamioo/event/guava/BaseEvent.java",
    "chars": 1143,
    "preview": "package io.gamioo.event.guava;\n\nimport java.util.concurrent.Executor;\nimport java.util.concurrent.Executors;\n\nimport com"
  },
  {
    "path": "gamioo-event/src/test/java/io/gamioo/event/guava/MainT.java",
    "chars": 194,
    "preview": "package io.gamioo.event.guava;\n\npublic class MainT {\n\n\tpublic static void main(String[] args) {\n\t\tUserLoginEvent event=n"
  },
  {
    "path": "gamioo-event/src/test/java/io/gamioo/event/guava/StageEventHandler.java",
    "chars": 591,
    "preview": "package io.gamioo.event.guava;\n\nimport com.google.common.eventbus.Subscribe;\nimport org.apache.logging.log4j.LogManager;"
  },
  {
    "path": "gamioo-event/src/test/java/io/gamioo/event/guava/UserEventHandler.java",
    "chars": 715,
    "preview": "package io.gamioo.event.guava;\n\nimport com.google.common.eventbus.Subscribe;\nimport org.apache.logging.log4j.LogManager;"
  },
  {
    "path": "gamioo-event/src/test/java/io/gamioo/event/guava/UserLoginEvent.java",
    "chars": 557,
    "preview": "package io.gamioo.event.guava;\n\npublic class UserLoginEvent extends BaseEvent{\n\n\tprivate String name;\n\n\tpublic String ge"
  },
  {
    "path": "gamioo-event/src/test/resources/log4j2.component.properties",
    "chars": 146,
    "preview": "Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\n# default values is 256*1024\nAsyncLo"
  },
  {
    "path": "gamioo-event/src/test/resources/log4j2.xml",
    "chars": 1549,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- status=debug 可 以查看log4j的装配过程级别有8个  ALL,TRACE, DEBUG, INFO, WARN, ERROR ,FATA"
  },
  {
    "path": "gamioo-game/.settings/.gitignore",
    "chars": 34,
    "preview": "/org.eclipse.buildship.core.prefs\n"
  },
  {
    "path": "gamioo-game/build.gradle",
    "chars": 329,
    "preview": "dependencies {\n    implementation project(':gamioo-network');\n    implementation project(':gamioo-common');\n    implemen"
  },
  {
    "path": "gamioo-game/src/main/java/io/gamioo/game/Main.java",
    "chars": 134,
    "preview": "package io.gamioo.game;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(\"hello,soya"
  },
  {
    "path": "gamioo-game/src/main/java/io/gamioo/game/activity/package-info.java",
    "chars": 112,
    "preview": "/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\npackage io.gamioo.game.activity;\n/**活动系统*/"
  },
  {
    "path": "gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordUnit.java",
    "chars": 1127,
    "preview": "package io.gamioo.game.word;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\nimport java.util.Arr"
  },
  {
    "path": "gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordsReader.java",
    "chars": 2544,
    "preview": "package io.gamioo.game.word;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\nimport java.io.Buffe"
  },
  {
    "path": "gamioo-game/src/main/java/io/gamioo/game/word/DirtyWordsValidator.java",
    "chars": 2578,
    "preview": "package io.gamioo.game.word;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\nimport java.util.*;\n"
  },
  {
    "path": "gamioo-game/src/test/java/io/gamioo/game/BalanceBusinessExecutorTest.java",
    "chars": 6413,
    "preview": "package io.gamioo.game;\n\nimport org.apache.commons.lang3.RandomUtils;\nimport org.apache.logging.log4j.LogManager;\nimport"
  },
  {
    "path": "gamioo-game/src/test/java/io/gamioo/game/DeviationDTO.java",
    "chars": 744,
    "preview": "package io.gamioo.game;\n\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3.builde"
  },
  {
    "path": "gamioo-game/src/test/resources/log4j2.component.properties",
    "chars": 146,
    "preview": "Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\n# default values is 256*1024\nAsyncLo"
  },
  {
    "path": "gamioo-game/src/test/resources/log4j2.xml",
    "chars": 2741,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- status=debug 可 以查看log4j的装配过程级别有8个  ALL,TRACE, DEBUG, INFO, WARN, ERROR ,FATA"
  },
  {
    "path": "gamioo-ioc/.settings/.gitignore",
    "chars": 34,
    "preview": "/org.eclipse.buildship.core.prefs\n"
  },
  {
    "path": "gamioo-ioc/build.gradle",
    "chars": 152,
    "preview": "dependencies {\n    implementation project(':gamioo-common');\n    //  implementation group: 'org.jenkins-ci.plugins', nam"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/PropertyValue.java",
    "chars": 1029,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/PropertyValues.java",
    "chars": 1094,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/AnnotationAttributes.java",
    "chars": 4052,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/AnnotationBeanDefinitionReader.java",
    "chars": 1947,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Attribute.java",
    "chars": 992,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Bean.java",
    "chars": 920,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/CommandMapping.java",
    "chars": 1131,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Configuration.java",
    "chars": 1002,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/DefaultResourceLoader.java",
    "chars": 5973,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Mapping.java",
    "chars": 979,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/RequestMapping.java",
    "chars": 1541,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Scheduled.java",
    "chars": 917,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Subscribe.java",
    "chars": 967,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/annotation/Value.java",
    "chars": 322,
    "preview": "package io.gamioo.ioc.annotation;\n\nimport java.lang.annotation.*;\n\n/**\n * 注入配置文件中的属性.\n *\n * @author Allen Jiang\n * @sinc"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanFactoryPostProcessor.java",
    "chars": 856,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanPostProcessor.java",
    "chars": 988,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/config/BeanReference.java",
    "chars": 1123,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/context/ApplicationContext.java",
    "chars": 977,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/context/ClassPathBeanDefinitionScanner.java",
    "chars": 4881,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/context/ConfigApplicationContext.java",
    "chars": 3508,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/BeanDefinition.java",
    "chars": 1867,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ConfigurationBeanDefinition.java",
    "chars": 2835,
    "preview": "package io.gamioo.ioc.definition;\n\nimport com.alibaba.fastjson2.JSONObject;\nimport io.gamioo.common.util.JSONUtils;\nimpo"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ControllerBeanDefinition.java",
    "chars": 2136,
    "preview": "package io.gamioo.ioc.definition;\n\nimport io.gamioo.ioc.annotation.CommandMapping;\nimport io.gamioo.ioc.annotation.Reque"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/Definition.java",
    "chars": 1149,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/FieldDefinition.java",
    "chars": 925,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericBeanDefinition.java",
    "chars": 6610,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericFieldDefinition.java",
    "chars": 1987,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/GenericMethodDefinition.java",
    "chars": 2830,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ListFieldDefinition.java",
    "chars": 515,
    "preview": "package io.gamioo.ioc.definition;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.ParameterizedType;\n\n/**\n * 所"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/MapFieldDefinition.java",
    "chars": 509,
    "preview": "package io.gamioo.ioc.definition;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.ParameterizedType;\n\n/**\n * M"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/MethodDefinition.java",
    "chars": 1199,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/definition/ResourceBeanDefinition.java",
    "chars": 325,
    "preview": "package io.gamioo.ioc.definition;\n\nimport java.lang.annotation.Annotation;\n\n/**\n *  资源解析管理器的定义\n *\n * @author Allen Jiang"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/BeanFactory.java",
    "chars": 1435,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/ObjectFactory.java",
    "chars": 1305,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/annotation/Autowired.java",
    "chars": 1010,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractAutowireCapableBeanFactory.java",
    "chars": 4171,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanDefinition.java",
    "chars": 3076,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanDefinitionReader.java",
    "chars": 1655,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/AbstractBeanFactory.java",
    "chars": 11735,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/BeanDefinitionReader.java",
    "chars": 823,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/support/DefaultListableBeanFactory.java",
    "chars": 1414,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/xml/XmlBeanDefinitionReader.java",
    "chars": 4364,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/factory/xml/XmlResourceLoader.java",
    "chars": 1720,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/AbstractResource.java",
    "chars": 1240,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/FileClassResource.java",
    "chars": 1129,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/JarClassResource.java",
    "chars": 1019,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/Resource.java",
    "chars": 856,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/ResourceCallback.java",
    "chars": 761,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/ResourceLoader.java",
    "chars": 951,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/io/UrlFileResource.java",
    "chars": 833,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/Component.java",
    "chars": 966,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/Controller.java",
    "chars": 1110,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/Repository.java",
    "chars": 264,
    "preview": "package io.gamioo.ioc.stereotype;\n\nimport java.lang.annotation.*;\n\n/**\n * Repository注解用来标识一个数据库处理类.\n *\n * @author Allen "
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/Resource.java",
    "chars": 880,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/Service.java",
    "chars": 893,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/stereotype/package-info.java",
    "chars": 700,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/AnnotatedTypeMetadata.java",
    "chars": 1141,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/AnnotationMetadata.java",
    "chars": 791,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/ClassMetadata.java",
    "chars": 2525,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/MethodMetadata.java",
    "chars": 1742,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/AnnotationMetadataReadingVisitor.java",
    "chars": 1937,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/ClassMetadataReadingVisitor.java",
    "chars": 2492,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/type/classreading/MetadataReader.java",
    "chars": 1268,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/BeanWrapper.java",
    "chars": 1372,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/Command.java",
    "chars": 1664,
    "preview": "package io.gamioo.ioc.wrapper;\n\nimport io.gamioo.ioc.annotation.CommandMapping;\nimport org.apache.commons.lang3.builder."
  },
  {
    "path": "gamioo-ioc/src/main/java/io/gamioo/ioc/wrapper/MethodWrapper.java",
    "chars": 2220,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/DebugService.java",
    "chars": 510,
    "preview": "package io.gamioo.ioc;\n\nimport io.gamioo.ioc.factory.annotation.Autowired;\nimport io.gamioo.ioc.map.Command;\nimport io.g"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/IOCFactoryTest.java",
    "chars": 2404,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/MapTest.java",
    "chars": 1137,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/RoleService.java",
    "chars": 633,
    "preview": "package io.gamioo.ioc;\n\nimport io.gamioo.ioc.annotation.Subscribe;\nimport io.gamioo.ioc.factory.annotation.Autowired;\nim"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/SkillService.java",
    "chars": 434,
    "preview": "package io.gamioo.ioc;\n\nimport io.gamioo.ioc.factory.annotation.Autowired;\nimport io.gamioo.ioc.skill.AbstractSkill;\nimp"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/XmlBeanFactoryTest.java",
    "chars": 2163,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/action/UserController.java",
    "chars": 602,
    "preview": "package io.gamioo.ioc.action;\n\nimport io.gamioo.ioc.annotation.CommandMapping;\nimport io.gamioo.ioc.stereotype.Controlle"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/entity/Cache.java",
    "chars": 893,
    "preview": "package io.gamioo.ioc.entity;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\npublic class Cache "
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/entity/DB.java",
    "chars": 691,
    "preview": "package io.gamioo.ioc.entity;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\npublic class DB {\n "
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/entity/Server.java",
    "chars": 943,
    "preview": "package io.gamioo.ioc.entity;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\npublic class Server"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/entity/ServerConfig.java",
    "chars": 2683,
    "preview": "/*\n * Copyright 2015-2020 Gamioo Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddItemCommand.java",
    "chars": 509,
    "preview": "package io.gamioo.ioc.map;\n\nimport io.gamioo.ioc.stereotype.Component;\nimport org.apache.logging.log4j.LogManager;\nimpor"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddMoneyCommand.java",
    "chars": 513,
    "preview": "package io.gamioo.ioc.map;\n\nimport io.gamioo.ioc.stereotype.Component;\nimport org.apache.logging.log4j.LogManager;\nimpor"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/map/AddRmbCommand.java",
    "chars": 506,
    "preview": "package io.gamioo.ioc.map;\n\nimport io.gamioo.ioc.stereotype.Component;\nimport org.apache.logging.log4j.LogManager;\nimpor"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/map/Command.java",
    "chars": 149,
    "preview": "package io.gamioo.ioc.map;\n\n/**\n * some description\n *\n * @author Allen Jiang\n * @since 1.0.0\n */\npublic interface Comma"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/skill/AbstractSkill.java",
    "chars": 455,
    "preview": "package io.gamioo.ioc.skill;\n\n\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3."
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/skill/SkillA.java",
    "chars": 642,
    "preview": "package io.gamioo.ioc.skill;\n\nimport io.gamioo.ioc.stereotype.Component;\nimport org.apache.logging.log4j.LogManager;\nimp"
  },
  {
    "path": "gamioo-ioc/src/test/java/io/gamioo/ioc/skill/SkillB.java",
    "chars": 655,
    "preview": "package io.gamioo.ioc.skill;\n\nimport io.gamioo.ioc.stereotype.Component;\nimport org.apache.logging.log4j.LogManager;\nimp"
  },
  {
    "path": "gamioo-ioc/src/test/resources/gate-config.xml",
    "chars": 1164,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- id:  platformId: 联运平台  ; maxConcurrentUser: 允许同时最高在线  maxRegisterUser: 允许最多注"
  },
  {
    "path": "gamioo-ioc/src/test/resources/ioc.xml",
    "chars": 974,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http"
  },
  {
    "path": "gamioo-ioc/src/test/resources/junit-platform.properties",
    "chars": 452,
    "preview": "junit.jupiter.execution.parallel.enabled=true\n#\\u7c7b\\u5185\\u90e8\\u65b9\\u6cd5\\u5e76\\u884c\njunit.jupiter.execution.parall"
  },
  {
    "path": "gamioo-ioc/src/test/resources/log4j2.component.properties",
    "chars": 146,
    "preview": "Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\n# default values is 256*1024\nAsyncLo"
  },
  {
    "path": "gamioo-ioc/src/test/resources/log4j2.xml",
    "chars": 2187,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- status=debug 可 以查看log4j的装配过程级别有8个  ALL,TRACE, DEBUG, INFO, WARN, ERROR ,FATA"
  },
  {
    "path": "gamioo-log/.settings/.gitignore",
    "chars": 34,
    "preview": "/org.eclipse.buildship.core.prefs\n"
  },
  {
    "path": "gamioo-log/build.gradle",
    "chars": 694,
    "preview": "dependencies {\n    api group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1';\n    api group: 'org.apac"
  },
  {
    "path": "gamioo-log/src/main/java/io/gamioo/log/MainT.java",
    "chars": 131,
    "preview": "package io.gamioo.log;\n\npublic class MainT {\n\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(\"hello kett"
  },
  {
    "path": "gamioo-log/src/main/java/io/gamioo/log/package-info.java",
    "chars": 38,
    "preview": "/**\n * 日志库.\n */\npackage io.gamioo.log;"
  },
  {
    "path": "gamioo-log/src/main/resources/log4j2.component.properties",
    "chars": 182,
    "preview": "Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector\n# default values is 256*1024\nAsyncLo"
  },
  {
    "path": "gamioo-log/src/main/resources/log4j2.xml",
    "chars": 1944,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- status=debug 可 以查看log4j的装配过程级别有8个  ALL,TRACE, DEBUG, INFO, WARN, ERROR ,FATA"
  }
]

// ... and 72 more files (download for full content)

About this extraction

This page contains the full source code of the jiangguilong2000/gamioo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 272 files (709.3 KB), approximately 202.3k tokens, and a symbol index with 1632 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!