πͺ v0.5.0: add `Inspector` class and `travel` method π΅οΈπ
The purpose of Inspectable Wrappers is to provide a standard for wrapper chain with the inspection ability.
- Core 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
Inspector
class is used to inspect the wrapper chain
Note
Thanks to inspirational discussions from @zavakid about Inspector
and WrapperAdapter
ππ«‘
βοΈ Features
- add
Inspector
class π΅οΈ (by @zavakid)
extractInspector
fromWrapper
- add
Inspector.travel
method π₯οΈ
and use it in methodsWrapper.inspect/getAttachment
π BugFix
- inspection/iteration of wrapper chain should not skip the last non-
Wrapper
instance π§
π οΈ Refactor
- move util methods to
Inspector
, removeInternalUtils
class - add missing QA annotations
π Documentation
- improve docs/javadoc π
π§ͺ Test
- add test case of inspecting last instance on wrapper chain
π Chore/Bulid
- upgrade dependencies/plugins π οΈ
πΌ Java API Doc
https://foldright.io/inspectable-wrappers/apidocs/0.5.0/index.html
πͺ Maven dependency
<dependency>
<groupId>io.foldright</groupId>
<artifactId>inspectable-wrappers</artifactId>
<version>0.5.0</version>
</dependency>