The decorator pattern is a fairly commonly used design pattern. It allows one object to be wrapped by another so that the wrapping object can either extend or completely override its functionality.
Two good examples of the decorator pattern being used within Java are the InputStream and OutputStream classes. Wrapper classes, like BufferedOutputStream and FilteredOutputStream, add functionality to the OutputStream they wrap.
CDI supports the decorator pattern through decorators and interceptors. Decorators ...