The purpose of Inspectable Wrappers is to provide a standard for wrapper chain with the inspection ability.
- The core interfaces/specification interfaces:
Wrapper
interface is used to
be implemented by wrapper classes, make an inspectable wrapper chain(linked list)Attachable
interface is used to
enhance the wrapper instances with the attachment storage abilityWrapperAdapter
interface is used to
adapt an existed wrapper instance to typeWrapper
without modifying it
- The
Inspector
class is used to inspect the wrapper chain - The utility classes:
AttachableDelegate
class provides a simpleAttachable
delegate implementationWrapperAdapterUtils
class provides utility methods for creatingWrapperAdapter
instances without writing boilerplate codes of creating new adapter classes
🛠 Refactor/Improvements
- refactor(
Inspector
): usefast and slow pointers
instead ofhistory IdentityHashMap
to detect the wrapper chain loop 🔁 - refactor: use
Class#isInstance
method ofisAssignableFrom
, more straightforward codes 🔤 - style: small adjust of line breaks
🧪 Test
- add
junit-jupiter
dependency in order to runJUnit 5
test cases inIntelliJ IDEA
🧪 - add
kotest.properties
to disableKotest autoscan
🍩
🚜 Chore/Bulid
- add qodana CI checks on github workflow 🧠
- add
IntelliJ IDEA
project dict 📖 - upgrade dependencies/plugins 🛠️
- upgrade maven wrapper to
3.9.9
🪶 - upgraded non-LTS JDK to 24 from 22 🤖
🍼 Java API Doc
https://foldright.io/api-docs/inspectable-wrappers/0.5.6/
🍪 Maven dependency
<dependency>
<groupId>io.foldright</groupId>
<artifactId>inspectable-wrappers</artifactId>
<version>0.5.6</version>
</dependency>