Skip to content

🪐 v0.5.4 add new methods of `Inspector` and `WrapperAdapterUtils` ☘️💗

Compare
Choose a tag to compare
@oldratlee oldratlee released this 10 Apr 12:52
· 17 commits to main since this release

inspectable-wrappers

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 ability
    • WrapperAdapter interface is used to
      adapt an existed wrapper instance to type Wrapper without modifying it
  • The Inspector class is used to inspect the wrapper chain
  • The utility classes:
    • AttachableDelegate class provides a simple Attachable delegate implementation
    • WrapperAdapterUtils class provides utility methods for creating WrapperAdapter instances without writing boilerplate codes of creating new adapter classes

Note

Thanks to inspirational discussions from @zavakid about Inspector and WrapperAdapter 💕🫡

☘️ Features

  • add new methods of Inspector ☘️
    • getInstancesOfWrapperChain
    • getBaseOfWrapperChain
    • unwrap
    • isWrapper
    • verifyWrapperChainContracts(W, Class<W>)
    • forEachOnWrapperChain
  • add overloaded methods of WrapperAdapterUtils to add tag interfaces 🤖
  • Inspector check cyclic wrapper chain 🔄 💣

🚜 Chore/Bulid

  • upgrade dependencies/plugins 🛠️
  • add jdk 22 into CI 🤖
  • improve pom version check ✅

🍼 Java API Doc

https://foldright.io/inspectable-wrappers/apidocs/0.5.4/index.html

🍪 Maven dependency

<dependency>
    <groupId>io.foldright</groupId>
    <artifactId>inspectable-wrappers</artifactId>
    <version>0.5.4</version>
</dependency>