Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
467 commits
Select commit Hold shift + click to select a range
6c9f2e3
Use base test class for MBeanAttributeInfoBuilder
mercyblitz Feb 23, 2026
2961401
Set attributeType directly in factory
mercyblitz Feb 23, 2026
215c944
Use attribute(Boolean.class) in test builder
mercyblitz Feb 23, 2026
6fcf1e1
Add MBeanParameterInfoBuilder
mercyblitz Feb 23, 2026
78fee98
Add MBeanParameterInfoBuilder unit test
mercyblitz Feb 23, 2026
ede078d
Disable AbstractMBeanFeatureInfoBuilderTest
mercyblitz Feb 23, 2026
5df844c
Add @Units descriptor annotation
mercyblitz Feb 23, 2026
89ab6d3
Add CacheControlMBean test interface
mercyblitz Feb 23, 2026
fef1aa5
Add JMX Descriptor helpers & improve attributes
mercyblitz Feb 23, 2026
ea60196
Add JmxUtils tests for descriptors and attributes
mercyblitz Feb 23, 2026
186d2fc
Add setCacheSize to CacheControlMBean
mercyblitz Feb 23, 2026
1aaf73e
Add MBeanOperationInfo builder and method signature
mercyblitz Feb 23, 2026
cc507a6
Add MBeanExecutableInfoBuilder
mercyblitz Feb 23, 2026
decc687
Add MBeanConstructorInfoBuilder
mercyblitz Feb 23, 2026
3b23f9e
Use MBeanExecutableInfoBuilder for operations
mercyblitz Feb 23, 2026
28168eb
Extract signature(Parameter[]) helper
mercyblitz Feb 23, 2026
ebb6239
Add MBeanConstructorInfoBuilder unit tests
mercyblitz Feb 23, 2026
b30d01e
Add MBeanNotificationInfoBuilder
mercyblitz Feb 24, 2026
84c324a
Add MBeanNotificationInfoBuilderTest
mercyblitz Feb 24, 2026
54acc83
Add getter/setter/is method utilities
mercyblitz Feb 25, 2026
2a707e0
Add MethodUtils unit tests and helpers
mercyblitz Feb 25, 2026
2dbff0d
Make MBean attribute fields package-private
mercyblitz Feb 25, 2026
94e7542
Create MBeanDescribableBuilder.java
mercyblitz Feb 25, 2026
cdefd75
Add AbstractMBeanDescribableBuilderTest
mercyblitz Feb 25, 2026
1039960
Make MBeanFeatureInfoBuilder extend base describable builder
mercyblitz Feb 25, 2026
10f11c3
Inherit describable test base and simplify test
mercyblitz Feb 25, 2026
430bb10
Make parameters field protected
mercyblitz Feb 25, 2026
bb2950c
Make types API public and add notification()
mercyblitz Feb 25, 2026
e9375ae
Rename 'type' to 'returnType' in builder
mercyblitz Feb 25, 2026
fdb9e1d
Make type field package-private
mercyblitz Feb 25, 2026
cfbda4a
Refactor notification assertions in test
mercyblitz Feb 25, 2026
fe478cc
Add MBeanInfoBuilder for JMX MBeanInfo
mercyblitz Feb 25, 2026
5a2db2f
Add MBeanInfoBuilderTest unit tests
mercyblitz Feb 25, 2026
af25cb5
Add EMPTY_* MBeanInfo array constants
mercyblitz Feb 25, 2026
5c5bde9
Add test for empty MBean constant arrays
mercyblitz Feb 25, 2026
e095256
Add CacheControl MBean implementation
mercyblitz Feb 25, 2026
851215a
Remove decapitalize usage in MBeanInfoBuilder
mercyblitz Feb 25, 2026
ca0fc02
Simplify JMX attribute lookup, add exception case
mercyblitz Feb 25, 2026
13afe92
Enhance JmxUtils tests for errors and lookups
mercyblitz Feb 25, 2026
4df773a
Use ArrayUtils.length and reorder offset assignment
mercyblitz Feb 25, 2026
cbbe05e
Replace logger field with inherited log()
mercyblitz Feb 25, 2026
446e820
Use AbstractTestCase.log in executor test
mercyblitz Feb 25, 2026
84fb348
Make AbstractEventListener extend AbstractTestCase
mercyblitz Feb 25, 2026
7d9d7ca
Use log(...) instead of logger.trace in test
mercyblitz Feb 25, 2026
ad1a2fe
Replace logger.trace guard with log() call
mercyblitz Feb 25, 2026
f811e75
Use log() helper in ThrowableActionTest
mercyblitz Feb 25, 2026
7a92fb4
Use log() helper in ThrowableBiConsumerTest
mercyblitz Feb 25, 2026
1c41d35
Extend test class with AbstractTestCase
mercyblitz Feb 25, 2026
2aae1e8
Remove logging from MethodDefinitionTest
mercyblitz Feb 25, 2026
08ea112
Use AbstractTestCase.log in ArrayUtilsTest
mercyblitz Feb 25, 2026
e04cc40
Replace Logger with AbstractTestCase logging
mercyblitz Feb 25, 2026
310a599
Extend StopWatchTest from AbstractTestCase
mercyblitz Feb 25, 2026
8a142af
Add Loggable test base class
mercyblitz Feb 25, 2026
c9f0e04
Have AbstractTestCase extend Loggable
mercyblitz Feb 25, 2026
31bb294
Add ShutdownHookCallback test class
mercyblitz Feb 25, 2026
ebbd328
Instantiate outer test and simplify callback
mercyblitz Feb 25, 2026
77f0282
Switch test to Loggable and remove callback class
mercyblitz Feb 25, 2026
4e3a786
Replace AbstractTestCase with Loggable
mercyblitz Feb 25, 2026
294402c
Extend Loggable in AbstractEventListener
mercyblitz Feb 25, 2026
0d77884
Add private log method to MethodDefinitionTest
mercyblitz Feb 25, 2026
c85d30a
Use Loggable.logger in ModifierTest
mercyblitz Feb 25, 2026
25d4456
Switch test base to Loggable
mercyblitz Feb 25, 2026
4a79bf5
Make AbstractPerformanceTest extend Loggable
mercyblitz Feb 25, 2026
eb00da9
Add static import for TEST_CLASS_LOADER
mercyblitz Feb 25, 2026
c88f887
Remove AbstractTestCase from VersionUtilsTest
mercyblitz Feb 25, 2026
4b5d83f
Remove AbstractTestCase inheritance from VersionTest
mercyblitz Feb 25, 2026
269a252
Replace AbstractTestCase inheritance with static imports
mercyblitz Feb 25, 2026
1426797
Use Loggable as base for ReadOnlyIteratorTest
mercyblitz Feb 25, 2026
fbd5344
Replace AbstractTestCase with Loggable
mercyblitz Feb 25, 2026
452eda4
Detach ArtifactTest from AbstractTestCase
mercyblitz Feb 25, 2026
507d808
Remove AbstractTestCase inheritance from AssertTest
mercyblitz Feb 25, 2026
d905657
Make test file utilities static and rename helper
mercyblitz Feb 25, 2026
40744a5
Remove AbstractTestCase from BeanUtilsTest
mercyblitz Feb 25, 2026
b7d5a7d
Remove AbstractTestCase from test class
mercyblitz Feb 25, 2026
a04a4a5
Import TEST_ELEMENT in SingletonEnumerationTest
mercyblitz Feb 25, 2026
74322bc
Import TEST_ELEMENT in SingletonIteratorTest
mercyblitz Feb 25, 2026
c4b6cbc
Import TEST_ELEMENT in UnmodifiableIteratorTest
mercyblitz Feb 25, 2026
68d8551
Switch ClassPathUtilsTest to Loggable
mercyblitz Feb 25, 2026
9f9e257
Remove AbstractTestCase from ClassUtilsTest
mercyblitz Feb 25, 2026
75cc640
Use Loggable and constants in CollectionUtilsTest
mercyblitz Feb 25, 2026
690cfb3
Use Loggable base class in test
mercyblitz Feb 25, 2026
44f231f
Test EnumerationIteratorAdapter with null enumeration
mercyblitz Feb 25, 2026
ac1b4cd
Replace AbstractTestCase with Loggable in test
mercyblitz Feb 25, 2026
71db35e
Use Loggable and createRandomTempFile in test
mercyblitz Feb 25, 2026
f61b0ab
Use Loggable and static-import AbstractTestCase
mercyblitz Feb 25, 2026
e5f3c82
Use Loggable base in FileWatchServiceTest
mercyblitz Feb 25, 2026
68e21f4
Refactor FilterUtilsTest to use lambdas & statics
mercyblitz Feb 25, 2026
374d3c5
Remove AbstractTestCase inheritance in IOUtilsTest
mercyblitz Feb 25, 2026
2e4b6e2
Remove AbstractTestCase inheritance in test
mercyblitz Feb 25, 2026
706481f
Remove AbstractTestCase base class from JSONTest
mercyblitz Feb 25, 2026
9443ffc
Remove AbstractTestCase inheritance in JarUtilsTest
mercyblitz Feb 25, 2026
abf7b2c
Remove AbstractTestCase from JmxUtilsTest
mercyblitz Feb 25, 2026
9e78684
Use Loggable in ListUtilsTest and clean imports
mercyblitz Feb 25, 2026
2bd64fa
Remove AbstractTestCase base from ListsTest
mercyblitz Feb 25, 2026
2bb33ad
Remove AbstractTestCase inheritance in test
mercyblitz Feb 25, 2026
32456cd
Remove AbstractTestCase inheritance from test
mercyblitz Feb 25, 2026
c43bf84
Use Loggable instead of AbstractTestCase in test
mercyblitz Feb 25, 2026
41e1e95
Use Loggable base class in ProcessManagerTest
mercyblitz Feb 25, 2026
31294fe
Remove AbstractTestCase inheritance from test
mercyblitz Feb 25, 2026
106f4c4
Drop AbstractTestCase from SetUtilsTest
mercyblitz Feb 25, 2026
d569bc7
Remove AbstractTestCase inheritance from SetsTest
mercyblitz Feb 25, 2026
04735fb
Remove AbstractTestCase inheritance from test
mercyblitz Feb 25, 2026
45021e8
Extend test with Loggable and add static helpers
mercyblitz Feb 25, 2026
e86e2ae
Use TEST_CLASS_LOADER in file watch test
mercyblitz Feb 25, 2026
2672324
Use Loggable base class in StopWatchTest
mercyblitz Feb 25, 2026
c53b5eb
Remove AbstractTestCase inheritance in test
mercyblitz Feb 25, 2026
577d4a9
Use Loggable base class in ThrowableActionTest
mercyblitz Feb 25, 2026
28413a8
Use Loggable in ThrowableBiConsumerTest
mercyblitz Feb 25, 2026
c4e7894
Remove trailing newline in ThrowableBiConsumerTest
mercyblitz Feb 25, 2026
41fcabc
Make test helper methods public static
mercyblitz Feb 25, 2026
2268f30
Use static assertValues in TypeFinderTest
mercyblitz Feb 25, 2026
842c344
Remove AbstractTestCase inheritance from TypeUtilsTest
mercyblitz Feb 25, 2026
ef8e519
Use TEST_* constants in URLUtilsTest
mercyblitz Feb 25, 2026
40ba3ee
Use isNotEmpty for authority check
mercyblitz Feb 26, 2026
77c4338
Fix MemberUtilsTest assertions to use isAbstract
mercyblitz Feb 26, 2026
1e67115
Introduce CASE_SENSITIVE constant
mercyblitz Feb 26, 2026
da9535c
Merge branch 'microsphere-projects:dev' into dev
mercyblitz Feb 26, 2026
aa75b03
Merge pull request #233 from mercyblitz/dev
mercyblitz Feb 26, 2026
8bf0157
Merge branch 'dev' into dependabot/maven/org.springframework-spring-f…
mercyblitz Feb 26, 2026
afe46d8
Merge branch 'dev' into dependabot/maven/ch.qos.logback-logback-class…
mercyblitz Feb 26, 2026
2735888
Merge branch 'dev' into dependabot/maven/junit.version-6.0.3
mercyblitz Feb 26, 2026
bd54394
Merge pull request #242 from microsphere-projects/dependabot/maven/or…
mercyblitz Feb 26, 2026
9cb72b1
Merge pull request #241 from microsphere-projects/dependabot/maven/ch…
mercyblitz Feb 26, 2026
ed547b3
Update pom.xml
mercyblitz Feb 26, 2026
ee59f24
Merge pull request #239 from microsphere-projects/dependabot/maven/ju…
mercyblitz Feb 26, 2026
9f9c8c3
Add test: testExecute3OnHandleException
mercyblitz Feb 26, 2026
1547458
Add abstract parameterized LoggingTest
mercyblitz Feb 26, 2026
c00043c
Make ShutdownHookCallbacksThreadTest extend LoggingTest
mercyblitz Feb 26, 2026
6614752
Have test class extend LoggingTest
mercyblitz Feb 26, 2026
22f05dc
Extend ArtifactDetectorTest with LoggingTest
mercyblitz Feb 26, 2026
226fd8b
Guard trace logging with isTraceEnabled check
mercyblitz Feb 26, 2026
f7d89a6
Make JarUtilsTest extend LoggingTest
mercyblitz Feb 26, 2026
7ced9ea
Guard trace logs with isTraceEnabled checks
mercyblitz Feb 26, 2026
ed84b26
Make ClassUtilsTest extend LoggingTest
mercyblitz Feb 26, 2026
78dac16
Guard logger.trace with isTraceEnabled()
mercyblitz Feb 26, 2026
1049f2e
Make FieldUtilsTest extend LoggingTest
mercyblitz Feb 26, 2026
635ed52
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
420dc40
Guard trace logs with isTraceEnabled()
mercyblitz Feb 26, 2026
ac64d1d
Extend resolver test with LoggingTest
mercyblitz Feb 26, 2026
8482399
Convert Loggable to interface; update tests
mercyblitz Feb 26, 2026
26b214c
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
61cfb74
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
26aa1da
Make IOUtilsTest extend LoggingTest
mercyblitz Feb 26, 2026
e2bd8ae
Guard trace logs with isTraceEnabled
mercyblitz Feb 26, 2026
c7d2163
Make StandardFileWatchServiceTest extend LoggingTest
mercyblitz Feb 26, 2026
1f2f4be
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
aa2e719
Make test extend LoggingTest
mercyblitz Feb 26, 2026
5f51bf8
Guard trace log with isTraceEnabled
mercyblitz Feb 26, 2026
5b8a0d6
Make URLUtilsTest extend LoggingTest
mercyblitz Feb 26, 2026
1089014
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
96e03aa
Make ClassicProcessIdResolverTest extend LoggingTest
mercyblitz Feb 26, 2026
2850982
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
ef201f9
Extend ModernProcessIdResolverTest with LoggingTest
mercyblitz Feb 26, 2026
62ee6a3
Guard trace logging with isTraceEnabled()
mercyblitz Feb 26, 2026
d2bba53
Make ProcessExecutorTest extend LoggingTest
mercyblitz Feb 26, 2026
f7d5611
Guard trace logging with isTraceEnabled
mercyblitz Feb 26, 2026
2c6e3e1
Make VM process test extend LoggingTest
mercyblitz Feb 26, 2026
4cd9b50
Add addIfAbsent to ListUtils
mercyblitz Feb 26, 2026
72b5028
Add test for ListUtils.addIfAbsent
mercyblitz Feb 26, 2026
28c3398
Use addIfAbsent and length util in TypeFinder
mercyblitz Feb 26, 2026
cf531eb
Add tests for TypeFinder.getSuperTypes
mercyblitz Feb 26, 2026
db49d6b
Add tests for generic type helpers
mercyblitz Feb 26, 2026
6d572b2
Update FieldUtils.java
mercyblitz Feb 27, 2026
42f38c3
Use handleFieldException in FieldUtilsTest
mercyblitz Feb 27, 2026
9507cf4
Test JSONArray(JSONTokener) constructor
mercyblitz Feb 27, 2026
1b42d00
Remove redundant 'this.' in recursive scan call
mercyblitz Feb 27, 2026
d6ee1e6
Add tests for scanning empty directory and file
mercyblitz Feb 27, 2026
55f94b1
Add StackWalker & MethodHandle caller lookup
mercyblitz Mar 1, 2026
f4b3788
Enhance ReflectionUtilsTest for StackWalker
mercyblitz Mar 1, 2026
b93bf24
Refactor ReflectionUtils benchmark methods
mercyblitz Mar 1, 2026
550f41c
Make getCallerClass robust to large frames
mercyblitz Mar 1, 2026
fd6b000
Increase StackWalker depth and adjust caller offset
mercyblitz Mar 1, 2026
2f7daf2
Remove StackWalker logic from StackTraceUtils
mercyblitz Mar 1, 2026
afceab2
Reduce StackTraceUtilsTest to test getStackTrace
mercyblitz Mar 1, 2026
4cc004a
Remove StackTraceElementUtilsBenchmark test
mercyblitz Mar 1, 2026
54bb2ae
Add stack-trace based caller lookup utilities
mercyblitz Mar 1, 2026
46fcf6a
Add tests for StackTraceUtils caller methods
mercyblitz Mar 1, 2026
55b88a7
Refactor caller-class stack frame offsets
mercyblitz Mar 2, 2026
912807a
Use StackTraceUtils static import in benchmark
mercyblitz Mar 2, 2026
8a285d0
Use stack-trace caller lookup and increment frame
mercyblitz Mar 2, 2026
570c446
Increase caller depth in ClassLoaderUtils
mercyblitz Mar 2, 2026
da25f26
Add SecurityUtils and tests
mercyblitz Mar 2, 2026
3d2a2fa
Add class-load test policy granting AllPermission
mercyblitz Mar 2, 2026
f0f6caf
Use default ClassLoader for getBundle
mercyblitz Mar 3, 2026
b3dd6d5
Simplify ClassLoaderUtils null checks
mercyblitz Mar 3, 2026
d79b6ac
Add resource-type and logging tests
mercyblitz Mar 3, 2026
4342e5b
Add test for JSONStringer.toString()
mercyblitz Mar 3, 2026
74b0365
Add assertion for trailing char in JSONTokener
mercyblitz Mar 3, 2026
84aa749
Add missing assertions in MapUtilsTest
mercyblitz Mar 3, 2026
e9cd780
Add test for configure(null) handling
mercyblitz Mar 3, 2026
cc9ecfe
Add Iterators.equals for Iterator comparison
mercyblitz Mar 3, 2026
8eb74a6
Add IteratorsTest for Iterators.equals
mercyblitz Mar 3, 2026
f471c83
Add Javadoc to Iterators.equals
mercyblitz Mar 3, 2026
44a90d5
Use Iterators.equals to compare iterators
mercyblitz Mar 3, 2026
d44f5d3
Qualify instance references with this in tests
mercyblitz Mar 3, 2026
f78c871
Add test for remove(null) in ReversedDequeTest
mercyblitz Mar 3, 2026
70100cf
Extend BeanUtilsTest and add assertion
mercyblitz Mar 3, 2026
0d83b5c
Refactor MutableCollectionTest to use newComparedInstance
mercyblitz Mar 3, 2026
ba11e73
Implement DelegatingWrapper and expose delegate
mercyblitz Mar 3, 2026
91b4389
Use MutableQueueTest in DelegatingBlockingQueueTest
mercyblitz Mar 3, 2026
4e77dbd
Remove extra blank line in ArtifactDetector
mercyblitz Mar 3, 2026
72ce0b8
Use LoggingTest and explicit classLoader in test
mercyblitz Mar 3, 2026
db292ff
Use instanceof in Task.equals; update tests
mercyblitz Mar 3, 2026
3cabd0a
Extend SystemUtilsTest with LoggingTest
mercyblitz Mar 3, 2026
8ede298
Add reversed(MethodHandle) overload
mercyblitz Mar 3, 2026
f69f5ab
Refactor ParameterizedTypeImpl and add tests
mercyblitz Mar 4, 2026
9c0c682
Extract file-entry check to helper method
mercyblitz Mar 4, 2026
5e34364
Add test for SimpleJarEntryScanner.isFileEntry
mercyblitz Mar 4, 2026
3b65d60
Add inequality test for differing type arguments
mercyblitz Mar 4, 2026
126c70f
Add self-equality test and fix class whitespace
mercyblitz Mar 4, 2026
98fe494
Add test for Functional.on null handling
mercyblitz Mar 4, 2026
453093a
Add ReflectiveDefinition test classes
mercyblitz Mar 4, 2026
55b1b15
Add assertPackage(String) and update tests
mercyblitz Mar 4, 2026
0faba5b
Add self-equality and null-matches tests
mercyblitz Mar 4, 2026
217d4dd
Use LoggingTest and add classLoader field
mercyblitz Mar 4, 2026
abbd8b2
Rename redundant test method names
mercyblitz Mar 4, 2026
27e68c1
Add equals inequality test to ReflectiveDefinitionTest
mercyblitz Mar 4, 2026
b38edec
Remove stray blank line in SimpleClassScanner
mercyblitz Mar 4, 2026
09143c9
Update SimpleClassScannerTest javadoc & assertions
mercyblitz Mar 4, 2026
1c42ae2
Make ConstructorUtilsTest extend LoggingTest
mercyblitz Mar 4, 2026
bf56cb6
Add SerializersTest and loadSPI tests
mercyblitz Mar 4, 2026
f14e1e0
Add Deserializers unit tests
mercyblitz Mar 4, 2026
feed2d9
Simplify PropertyResourceBundleControl IO handling
mercyblitz Mar 4, 2026
56bbce0
Add Supplier-based resolveClassPaths helper
mercyblitz Mar 4, 2026
22c4db0
Extract createArtifact and add tests
mercyblitz Mar 4, 2026
e5246bd
Extract assertCapacity and add corresponding test
mercyblitz Mar 4, 2026
43a7da6
Make selector package-private; extract test factories
mercyblitz Mar 4, 2026
5702ae0
Use instanceof in ValueHolder.equals
mercyblitz Mar 4, 2026
9757026
Refactor MethodKey equals/hashCode and update tests
mercyblitz Mar 4, 2026
6ab3963
Refactor resource lookup in SimpleClassScanner
mercyblitz Mar 4, 2026
ea79d89
Simplify MethodUtils exception handling and tests
mercyblitz Mar 4, 2026
0b47749
Extend test with LoggingTest
mercyblitz Mar 4, 2026
e25a6b9
Use Thread.currentThread() for group
mercyblitz Mar 4, 2026
8eed8ad
Expose resolveArguments and add unit tests
mercyblitz Mar 4, 2026
99a0482
Change missing MethodHandle log to TRACE
mercyblitz Mar 4, 2026
dd527d7
Update MethodKey tests for valueOf overloads
mercyblitz Mar 4, 2026
3539dfe
Add test for numberToString(1.23)
mercyblitz Mar 4, 2026
fbd8edd
Extract getDefaultClassLoader and add tests
mercyblitz Mar 4, 2026
f61d1cc
Add shutdownHookThreadsMap(Class) overload and tests
mercyblitz Mar 4, 2026
b5a6ebd
Add logging and robust listener loading
mercyblitz Mar 4, 2026
dff45b4
Use Boolean.valueOf in test assertion
mercyblitz Mar 4, 2026
d19a478
Simplify resource-not-found test
mercyblitz Mar 4, 2026
e26ccbe
Use explicit equals assertions in tests
mercyblitz Mar 4, 2026
ffaa320
Use assertDoesNotThrow in ThrowableConsumerTest
mercyblitz Mar 4, 2026
a2be7fe
Annotate testRemove with @Override
mercyblitz Mar 4, 2026
f46af6c
Add @Override to testEquals
mercyblitz Mar 4, 2026
44c6a6f
Merge pull request #243 from mercyblitz/dev
mercyblitz Mar 4, 2026
1a250be
Update README with new modules and Javadocs
mercyblitz Mar 4, 2026
1d009fb
Merge branch 'dev' of https://github.com/mercyblitz/microsphere-java …
mercyblitz Mar 4, 2026
9f78de2
Merge pull request #247 from mercyblitz/dev
mercyblitz Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ jobs:
java: [ '8', '11' , '17' , '21' , '25' ]
steps:
- name: Checkout Source
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup JDK ${{ matrix.Java }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven

- name: Build with Maven
run: mvn
run: ./mvnw
--batch-mode
--update-snapshots
--file pom.xml
-Drevision=0.0.1-SNAPSHOT
-Dsurefire.useSystemClassLoader=false
test
--activate-profiles test,coverage

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
if: ${{ inputs.revision }}
steps:
- name: Checkout Source
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Maven Central Repository
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
Expand Down
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
19 changes: 3 additions & 16 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# Copyright 2013-2023 the original author or 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://maven.aliyun.com/repository/public/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,30 @@ frameworks like Spring, making it a versatile addition to any Java developer's t
- JMX
- Versioning
- Annotation processing
- Tools
- Testing

## Modules

The framework is organized into several key modules:

Module | Purpose
----------------------------------|-------------------------------------------------------------------------------------------------
microsphere-java-core | Provides core utilities across various domains like annotations, collections, concurrency, etc.
microsphere-annotation-processor | Offers annotation processing capabilities for compile-time code generation
microsphere-java-dependencies | Manages dependency versions across the project
microsphere-java-parent | Parent POM with shared configurations
Module | Purpose
----------------------------------|-----------------------------------------------------------------------------------------------------
microsphere-java-annotations | Provides the common annotations for Microsphere Java projects.
microsphere-java-core | Provides the core utilities across various domains like annotations, collections, concurrency, etc.
microsphere-java-model | Provides the components and utilities across Java Language Model API.
microsphere-jdk-tools | Offers the components for Java tools.
microsphere-annotation-processor | Offers annotation processing capabilities for compile-time code generation.
microsphere-java-test | Provides the models and components for Java testing.
microsphere-java-dependencies | Manages dependency versions across the project.
microsphere-java-parent | Parent POM with shared configurations.

## Getting Started

The easiest way to get started is by adding the Microsphere Java BOM (Bill of Materials) to your project's pom.xml:

```xml

<dependencyManagement>
<dependencies>
...
Expand All @@ -73,6 +80,7 @@ The easiest way to get started is by adding the Microsphere Java BOM (Bill of Ma
Then add the specific modules you need:

```xml

<dependencies>
<!-- Core utilities -->
<dependency>
Expand Down Expand Up @@ -159,8 +167,12 @@ We welcome your contributions! Please read [Code of Conduct](./CODE_OF_CONDUCT.m

### JavaDoc

- [microsphere-java-annotations](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-java-annotations)
- [microsphere-java-core](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-java-core)
- [microsphere-java-model](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-java-model)
- [microsphere-jdk-tools](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-jdk-tools)
- [microsphere-annotation-processor](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-annotation-processor)
- [microsphere-java-test](https://javadoc.io/doc/io.github.microsphere-projects/microsphere-java-test)

## License

Expand Down
30 changes: 23 additions & 7 deletions microsphere-annotation-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
<name>Microsphere :: Java :: Annotation Processor</name>
<description>Microsphere Annotation Processor</description>

<properties>
<javax.ws.rs.version>2.1</javax.ws.rs.version>
<jaxws-api.version>2.3.1</jaxws-api.version>
</properties>

<dependencies>

<!-- Microsphere Java Core -->
Expand All @@ -32,6 +27,13 @@
<version>${revision}</version>
</dependency>

<!-- Microsphere Language Model -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-lang-model</artifactId>
<version>${revision}</version>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -45,6 +47,22 @@
<scope>test</scope>
</dependency>

<!-- Microsphere JDK Tools -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-jdk-tools</artifactId>
<version>${revision}</version>
<scope>test</scope>
</dependency>

<!-- Microsphere Java Test -->
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-java-test</artifactId>
<version>${revision}</version>
<scope>test</scope>
</dependency>

<!-- Logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
Expand All @@ -56,15 +74,13 @@
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs.version}</version>
<scope>test</scope>
</dependency>

<!-- JAX-WS API-->
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>${jaxws-api.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package io.microsphere.annotation.processor;

import io.microsphere.annotation.ConfigurationProperty;
import io.microsphere.annotation.processor.model.util.ConfigurationPropertyJSONElementVisitor;
import io.microsphere.constants.ResourceConstants;
import io.microsphere.json.JSONArray;
import io.microsphere.metadata.ConfigurationPropertyGenerator;

Expand All @@ -35,12 +35,12 @@
import java.util.List;
import java.util.Set;

import static io.microsphere.annotation.processor.model.util.ConfigurationPropertyJSONElementVisitor.CONFIGURATION_PROPERTY_ANNOTATION_CLASS_NAME;
import static io.microsphere.annotation.processor.util.MessagerUtils.printNote;
import static io.microsphere.annotation.processor.ConfigurationPropertyJSONElementVisitor.CONFIGURATION_PROPERTY_ANNOTATION_CLASS_NAME;
import static io.microsphere.constants.ResourceConstants.CONFIGURATION_PROPERTY_METADATA_RESOURCE;
import static io.microsphere.constants.SymbolConstants.COMMA_CHAR;
import static io.microsphere.constants.SymbolConstants.LEFT_SQUARE_BRACKET_CHAR;
import static io.microsphere.constants.SymbolConstants.RIGHT_SQUARE_BRACKET_CHAR;
import static io.microsphere.lang.model.util.MessagerUtils.printNote;
import static io.microsphere.metadata.ConfigurationPropertyLoader.loadAll;
import static javax.lang.model.SourceVersion.latestSupported;
import static javax.tools.StandardLocation.CLASS_OUTPUT;
Expand All @@ -62,7 +62,7 @@
* </li>
* <li>{@link #resolveMetadata(RoundEnvironment)} traverses all root elements to extract configuration property metadata.</li>
* <li>{@link #writeMetadata()} writes the generated metadata into a JSON file under
* {@value #CONFIGURATION_PROPERTY_METADATA_RESOURCE_NAME} using a writer.</li>
* {@value ResourceConstants#CONFIGURATION_PROPERTY_METADATA_RESOURCE} using a writer.</li>
* </ul>
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
Expand Down Expand Up @@ -106,24 +106,28 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment

private void resolveMetadata(RoundEnvironment roundEnv) {
Set<? extends Element> elements = roundEnv.getRootElements();
if (!elements.isEmpty()) {
resolveMetadata(elements);
}

void resolveMetadata(Set<? extends Element> elements) {
jsonBuilder.append(LEFT_SQUARE_BRACKET_CHAR);

// Resolve the content
if (!elements.isEmpty()) {
Iterator<? extends Element> iterator = elements.iterator();
jsonBuilder.append(LEFT_SQUARE_BRACKET_CHAR);
while (iterator.hasNext()) {
Element element = iterator.next();
element.accept(jsonElementVisitor, jsonBuilder);
}

// append the JSON content generated by ConfigurationPropertyGenerator SPI
appendGeneratedConfigurationPropertyJSON(jsonBuilder);
}

int lastIndex = jsonBuilder.length() - 1;
if (COMMA_CHAR == jsonBuilder.charAt(lastIndex)) {
jsonBuilder.setCharAt(lastIndex, RIGHT_SQUARE_BRACKET_CHAR);
} else {
jsonBuilder.append(RIGHT_SQUARE_BRACKET_CHAR);
}
int lastIndex = jsonBuilder.length() - 1;
if (COMMA_CHAR == jsonBuilder.charAt(lastIndex)) {
jsonBuilder.setCharAt(lastIndex, RIGHT_SQUARE_BRACKET_CHAR);
} else {
jsonBuilder.append(RIGHT_SQUARE_BRACKET_CHAR);
}
}

Expand Down Expand Up @@ -151,9 +155,12 @@ private void writeMetadata() {
});
}

String toJSON() {
return jsonBuilder.toString();
}

@Override
public SourceVersion getSupportedSourceVersion() {
return latestSupported();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@
* limitations under the License.
*/

package io.microsphere.annotation.processor.model.util;
package io.microsphere.annotation.processor;

import io.microsphere.annotation.ConfigurationProperty;
import io.microsphere.beans.ConfigurationProperty.Metadata;
import io.microsphere.lang.model.util.AnnotatedElementJSONElementVisitor;
import io.microsphere.metadata.ConfigurationPropertyGenerator;

import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import java.util.List;
import java.util.Map;

import static io.microsphere.annotation.processor.util.AnnotationUtils.getAnnotation;
import static io.microsphere.annotation.processor.util.AnnotationUtils.getAttributeName;
import static io.microsphere.annotation.processor.util.AnnotationUtils.getElementValues;
import static io.microsphere.annotation.processor.util.AnnotationUtils.matchesDefaultAttributeValue;
import static io.microsphere.annotation.processor.util.ClassUtils.getClassName;
import static io.microsphere.annotation.processor.util.TypeUtils.getTypeName;
import static io.microsphere.constants.SymbolConstants.COMMA_CHAR;
import static io.microsphere.lang.model.util.AnnotationUtils.getAnnotation;
import static io.microsphere.lang.model.util.AnnotationUtils.getAttributeName;
import static io.microsphere.lang.model.util.AnnotationUtils.getElementValues;
import static io.microsphere.lang.model.util.AnnotationUtils.matchesDefaultAttributeValue;
import static io.microsphere.lang.model.util.ClassUtils.getClassName;
import static io.microsphere.lang.model.util.TypeUtils.getTypeName;
import static io.microsphere.util.ServiceLoaderUtils.loadFirstService;
import static io.microsphere.util.StringUtils.isBlank;

Expand All @@ -51,13 +53,13 @@
* @see io.microsphere.beans.ConfigurationProperty
* @since 1.0.0
*/
public class ConfigurationPropertyJSONElementVisitor extends AnnotatedElementJSONElementVisitor {
class ConfigurationPropertyJSONElementVisitor extends AnnotatedElementJSONElementVisitor {

public static final String CONFIGURATION_PROPERTY_ANNOTATION_CLASS_NAME = "io.microsphere.annotation.ConfigurationProperty";
static final String CONFIGURATION_PROPERTY_ANNOTATION_CLASS_NAME = "io.microsphere.annotation.ConfigurationProperty";

private final ConfigurationPropertyGenerator generator;

public ConfigurationPropertyJSONElementVisitor(ProcessingEnvironment processingEnv) {
ConfigurationPropertyJSONElementVisitor(ProcessingEnvironment processingEnv) {
super(processingEnv, CONFIGURATION_PROPERTY_ANNOTATION_CLASS_NAME);
this.generator = loadFirstService(ConfigurationPropertyGenerator.class);
}
Expand Down Expand Up @@ -87,8 +89,8 @@ public Boolean visitVariableAsField(VariableElement field, StringBuilder jsonBui
} else if ("description".equals(attributeName)) {
String description = resolveDescription(field, attributeMethod, annotationValue);
configurationProperty.setDescription(description);
} else if ("source".equals(attributeName)) {
setSources(configurationProperty, annotationValue);
} else {
setSources(configurationProperty, attributeName, annotationValue);
}
}
setDeclaredClass(configurationProperty, field);
Expand All @@ -102,6 +104,11 @@ public Boolean visitVariableAsField(VariableElement field, StringBuilder jsonBui
return false;
}

@Override
protected boolean supportsType(TypeElement e) {
return true;
}

public ConfigurationPropertyGenerator getGenerator() {
return generator;
}
Expand Down Expand Up @@ -130,12 +137,14 @@ private String resolveStringValue(ExecutableElement attributeMethod, AnnotationV
return (String) value;
}

private void setSources(io.microsphere.beans.ConfigurationProperty configurationProperty, AnnotationValue annotationValue) {
List<? extends AnnotationValue> sources = (List<? extends AnnotationValue>) annotationValue.getValue();
Metadata metadata = configurationProperty.getMetadata();
for (AnnotationValue source : sources) {
String sourceValue = (String) source.getValue();
metadata.getSources().add(sourceValue);
void setSources(io.microsphere.beans.ConfigurationProperty configurationProperty, String attributeName, AnnotationValue annotationValue) {
if ("source".equals(attributeName)) {
List<? extends AnnotationValue> sources = (List<? extends AnnotationValue>) annotationValue.getValue();
Metadata metadata = configurationProperty.getMetadata();
for (AnnotationValue source : sources) {
String sourceValue = (String) source.getValue();
metadata.getSources().add(sourceValue);
}
}
}

Expand All @@ -149,5 +158,4 @@ private void setDeclaredField(io.microsphere.beans.ConfigurationProperty configu
String declaredFieldName = field.getSimpleName().toString();
configurationProperty.getMetadata().setDeclaredField(declaredFieldName);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import javax.tools.JavaFileManager;
import java.util.function.BiFunction;

import static io.microsphere.annotation.processor.util.MessagerUtils.printMandatoryWarning;
import static io.microsphere.lang.model.util.MessagerUtils.printMandatoryWarning;
import static io.microsphere.reflect.FieldUtils.getFieldValue;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import java.util.function.BiFunction;
import java.util.function.Function;

import static io.microsphere.annotation.processor.util.MessagerUtils.printNote;
import static io.microsphere.annotation.processor.util.MessagerUtils.printWarning;
import static io.microsphere.lang.model.util.MessagerUtils.printNote;
import static io.microsphere.lang.model.util.MessagerUtils.printWarning;
import static io.microsphere.util.ExceptionUtils.wrap;
import static java.util.Optional.empty;
import static java.util.Optional.of;
Expand Down
Loading