org.openbp.jaspira.decoration
Interface Decorator
- All Known Implementing Classes:
- ChangeConnectionHandle.CanConnectDecorator, DebuggerPlugin.BreakPointDecorator, DebuggerPlugin.StepDecorator, FilteredDecorator, ListDecorator, ParamReorderTracker.SingleFigureDecorator, SelectionDecorator.ContentStateDecorator, SelectionDecorator.FillDecorator, SelectionDecorator.FrameDecorator, SelectionDecorator.OverlayDecorator, SelectionDecorator.StrokeDecorator, XConnectionTool.CanConnectDecorator
public interface Decorator
A decorator is a modifier for a single parameter (object).
For a detailed explanation, see the decorator pattern.
- Author:
- Stephan Moritz
|
Method Summary |
java.lang.Object |
decorate(java.lang.Object owner,
java.lang.String key,
java.lang.Object value)
Modifies the given object and returns it. |
decorate
java.lang.Object decorate(java.lang.Object owner,
java.lang.String key,
java.lang.Object value)
- Modifies the given object and returns it.
- Parameters:
owner - Owner of the object.
The decorator may use this to decide if the object should be dorated.
This parameter is passed from the DecorationMgr.decorate(java.lang.Object, java.lang.String, java.lang.Object) method.key - Key under which the decorator is accessedvalue - Object to decorate (also passed from the DecorationMgr.decorate(java.lang.Object, java.lang.String, java.lang.Object) method)
- Returns:
- The decorated object.
The decorator may either modify the original object and return it
or return a new object (or of course return the object unchanged).
The returned object will be passed to the next decorator.
Copyright © 2011. All Rights Reserved.