Hello everyone I have question ?
I read book Effective Java and they said "
The disadvantages of wrapper classes are few. One caveat is that wrapper
classes are not suited for use in callback frameworks, wherein objects pass selfreferences to other objects for subsequent invocations (“callbacks”). Because a
wrapped object doesn’t know of its wrapper, it passes a reference to itself (this)
and callbacks elude the wrapper. This is known as the SELF problem
[Lieberman86]. Some people worry about the performance impact of forwarding
method invocations or the memory footprint impact of wrapper objects "
and have refer in https://coderanch.com/t/670687/java/wrapper-class-suitable-callback-framework I understand that it is not suitable for callback , so do we have any solution to handle this issue ?